Actions
Bug #8383
closedRipper.lex does not handle correctly symbols whose identifiers coincide with keyword names
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0]
Backport:
Description
This problem is best illustrated with an example
[23] pry(main)> Ripper.lex(':one')
=> [[[1, 0], :on_symbeg, ":"], [[1, 1], :on_ident, "one"]]
[24] pry(main)> Ripper.lex(':alias')
=> [[[1, 0], :on_symbeg, ":"], [[1, 1], :on_kw, "alias"]]
I'm pretty sure that the correct tokenization of the second example should yield :on_ident instead of :on_kw. Or am I missing something?
This is the behaviour on both 1.9.3 and 2.0.0.
Actions
Like0
Like0Like0