From 066af25b58af97cc0b07773dd11b9a3aa55d40bf Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 9 Apr 2018 09:59:36 +0000 Subject: test_literal.rb: use assert_syntax_error git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_literal.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test/ruby/test_literal.rb') diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb index cf1a2babd7..f626e05397 100644 --- a/test/ruby/test_literal.rb +++ b/test/ruby/test_literal.rb @@ -518,11 +518,7 @@ class TestRubyLiteral < Test::Unit::TestCase bug2407 = '[ruby-dev:39798]' head.each {|h| if /^0/ =~ h - begin - eval("#{h}_") - rescue SyntaxError => e - assert_match(/numeric literal without digits\Z/, e.message, bug2407) - end + assert_syntax_error("#{h}_", /numeric literal without digits\Z/, "#{bug2407}: #{h.inspect}") end } end -- cgit v1.2.3