mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_literal.rb: use assert_syntax_error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
85e9f28793
commit
066af25b58
1 changed files with 1 additions and 5 deletions
|
@ -518,11 +518,7 @@ class TestRubyLiteral < Test::Unit::TestCase
|
||||||
bug2407 = '[ruby-dev:39798]'
|
bug2407 = '[ruby-dev:39798]'
|
||||||
head.each {|h|
|
head.each {|h|
|
||||||
if /^0/ =~ h
|
if /^0/ =~ h
|
||||||
begin
|
assert_syntax_error("#{h}_", /numeric literal without digits\Z/, "#{bug2407}: #{h.inspect}")
|
||||||
eval("#{h}_")
|
|
||||||
rescue SyntaxError => e
|
|
||||||
assert_match(/numeric literal without digits\Z/, e.message, bug2407)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue