summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-26 14:05:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-26 14:05:34 +0000
commit41f864faab6f1cdd8ad7e88c9c89fea200d030d2 (patch)
treeed3dcef06a52d57644cdbb9d642a9c38db07ea7f /test/ruby
parent2d9a4afb137d18bf16ec99f5a841b0f232b05a16 (diff)
parse.y: separate numeric literal
* parse.y (parser_yylex): separate numeric literal from succeeding token, and treat 'e' as floating point number only if followed by exponent part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_syntax.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 34bd1e0191..9daa0e4d49 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -363,6 +363,13 @@ eom
assert_constant_reassignment_toplevel("11", "+", %w[53], already)
end
+ def test_integer_suffix
+ ["1if true", "begin 1end"].each do |src|
+ assert_valid_syntax(src)
+ assert_equal(1, eval(src), src)
+ end
+ end
+
private
def not_label(x) @result = x; @not_label ||= nil end