1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Fix #256

Support int that follow on symbeg in IRB

https://github.com/ruby/irb/commit/90cb27b1bd
This commit is contained in:
manga_osyo 2021-07-20 22:25:32 +09:00 committed by git
parent 62661dd9e4
commit 86e0eecc84

View file

@ -715,7 +715,7 @@ class RubyLex
start_token << t
end_type << :on_regexp_end
when :on_symbeg
acceptable_single_tokens = %i{on_ident on_const on_op on_cvar on_ivar on_gvar on_kw}
acceptable_single_tokens = %i{on_ident on_const on_op on_cvar on_ivar on_gvar on_kw on_int}
if (i + 1) < tokens.size and acceptable_single_tokens.all?{ |st| tokens[i + 1][1] != st }
start_token << t
end_type << :on_tstring_end