Ripper incorrectly handle literal keywords (as symbol, eg. :class)
Given the following use case of ripper:
[[[1, 0], :on_symbeg, ":"], [[1, 1], :on_kw, "class"]]
I'm thinking the output should be:
[[[1, 0], :on_symbeg, ":"], [[1, 1], :on_ident, "class"]]
Seems like a bug ?
Updated by eitoball (Eito Katagiri) over 9 years ago
No, I don't think that it is a bug.
It doesn't have to be an identifier after colon for a symbol.
":$0", ":VERSION", and ":>" are valid symbols. You might want
to take a look at parse.y in Ruby source code to see what can
be after colon for a symbol.