8000 test_literal.rb: use assert_syntax_error · willnet/ruby@066af25 · GitHub
[go: up one dir, main page]

Skip to content

Commit 066af25

Browse files
committed
test_literal.rb: use assert_syntax_error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 85e9f28 commit 066af25

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/ruby/test_literal.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,7 @@ def test_integer
518518
bug2407 = '[ruby-dev:39798]'
519519
head.each {|h|
520520
if /^0/ =~ h
521-
begin
522-
eval("#{h}_")
523-
rescue SyntaxError => e
524-
assert_match(/numeric literal without digits\Z/, e.message, bug2407)
525-
end
521+
assert_syntax_error("#{h}_", /numeric literal without digits\Z/, "#{bug2407}: #{h.inspect}")
526522
end
527523
}
528524
end

0 commit comments

Comments
 (0)
0