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 | b8ed380644a5f046cc39b5b75996f15c9434f1a3 (patch) | |
tree | fc919f90c99195c1764a42b2eb542ec3fb792975 /test/ruby | |
parent | f1c2e2aa3ee9e686f46873214220157e271e573d (diff) | |
download | ruby-b8ed380644a5f046cc39b5b75996f15c9434f1a3.tar.gz |
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')
-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 |