aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-09 11:09:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-09 11:09:30 +0000
commit49d1c8d3f4e7c6faf39e7fcedd6448a736fd695e (patch)
tree9f09c421a36b160d14e92d28137a59e71ee14715 /test
parentb8ed380644a5f046cc39b5b75996f15c9434f1a3 (diff)
downloadruby-49d1c8d3f4e7c6faf39e7fcedd6448a736fd695e.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')
-rw-r--r--test/ruby/test_literal.rb9
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