mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 15:06:10 +02:00
parse.y: flush numeric token
* parse.y (parser_number_literal_suffix, parse_numeric): flush numeric token so following unexpected token part is marked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d98afe3ae2
commit
e42a16190c
2 changed files with 12 additions and 0 deletions
|
@ -1007,6 +1007,12 @@ x = __ENCODING__
|
|||
end
|
||||
end
|
||||
|
||||
def test_unexpected_token_after_numeric
|
||||
assert_raise_with_message(SyntaxError, /^ \^~~\z/) do
|
||||
eval('0000xyz')
|
||||
end
|
||||
end
|
||||
|
||||
=begin
|
||||
def test_past_scope_variable
|
||||
assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue