diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_literal.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb index f626e05397..3b6aa0c096 100644 --- a/test/ruby/test_literal.rb +++ b/test/ruby/test_literal.rb @@ -516,11 +516,12 @@ class TestRubyLiteral < Test::Unit::TestCase } } bug2407 = '[ruby-dev:39798]' - head.each {|h| - if /^0/ =~ h - assert_syntax_error("#{h}_", /numeric literal without digits\Z/, "#{bug2407}: #{h.inspect}") + head.grep_v(/^0/) do |s| + head.grep(/^0/) do |h| + h = "#{s}#{h}_" + assert_syntax_error(h, /numeric literal without digits\Z/, "#{bug2407}: #{h.inspect}") end - } + end end def test_float |