summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-30 02:00:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-30 02:00:14 +0000
commitc0839de0841d5ddad6a5961a83f7d1d80c036c3a (patch)
treeffdd622a377e137ce4d94ace8c5195ec03f80827 /test/ruby
parent2f50b390b3acdd9c6a0a9b14694d917bd3f718d9 (diff)
downloadruby-c0839de0841d5ddad6a5961a83f7d1d80c036c3a.tar.gz
ruby-c0839de0841d5ddad6a5961a83f7d1d80c036c3a.tar.xz
ruby-c0839de0841d5ddad6a5961a83f7d1d80c036c3a.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@25962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_literal.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb
index 52f770494..e251197c7 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