From b19b496248cc71f6454dd153bc84a0b86e62de89 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 30 Nov 2009 02:00:14 +0000 Subject: * parse.y (parser_yylex): suppress an extra error message after numeric literal without digits. based on a patch from ujihisa . in [ruby-dev:39811]. [ruby-dev:39798] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_literal.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb index 52f7704940..e251197c79 100644 --- a/test/ruby/test_literal.rb +++ b/test/ruby/test_literal.rb @@ -211,6 +211,16 @@ class TestRubyLiteral < Test::Unit::TestCase } } } + bug2407 = '[ruby-dev:39798]' + head.each {|h| + if /^0/ =~ h + begin + eval("#{h}_") + rescue SyntaxError => e + assert_match(/numeric literal without digits\Z/, e.message, bug2407) + end + end + } end def test_float -- cgit v1.2.3