diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-09 09:59:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-09 09:59:36 +0000 |
commit | 066af25b58af97cc0b07773dd11b9a3aa55d40bf (patch) | |
tree | fc919f90c99195c1764a42b2eb542ec3fb792975 /test/ruby/test_literal.rb | |
parent | 85e9f2879373aa496c5c3c7f900ba4869a9ca3f7 (diff) |
test_literal.rb: use assert_syntax_error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_literal.rb')
-rw-r--r-- | test/ruby/test_literal.rb | 6 |
1 files changed, 1 insertions, 5 deletions
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 |