diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-09 11:09:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-09 11:09:30 +0000 |
commit | 6a571272227b0093a1b0fa82225ebde04ce1a69b (patch) | |
tree | 9f09c421a36b160d14e92d28137a59e71ee14715 /test/ruby/test_literal.rb | |
parent | 066af25b58af97cc0b07773dd11b9a3aa55d40bf (diff) | |
download | ruby-6a571272227b0093a1b0fa82225ebde04ce1a69b.tar.gz |
parse.y: extra error message after no digits
* parse.y (no_digits): return tINTEGER instead of unexpected
end-of-input, to get rid of extra error messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_literal.rb')
-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 |