Actions
Bug #3764
closedRipper incorrectly handle literal keywords (as symbol, eg. :class)
Description
=begin
Given the following use case of ripper:
pp Ripper.lex(':class')
I'm gettting:
[[[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 ?
=end
Updated by ngtzeyang (TzeYang Ng) about 14 years ago
Updated by eitoball (Eito Katagiri) about 14 years ago
=begin
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.
=end
Updated by naruse (Yui NARUSE) about 14 years ago
- Status changed from Open to Rejected
- ruby -v set to 1.9.3
=begin
It can be a trap, but it is spec.
=end
Actions
Like0
Like0Like0Like0