ActionsLike0
Feature #9319
closedAdd constant RUBY_KEYWORDS or a similar way to output which keywords exist at runtime
Description
Hi,
Would it be possible to list all keywords in Ruby, from within a running program?
Like RUBY_KEYWORDS or similar?
Reasoning: On IRB someone asked me if "in" is a keyword. I was not sure so I googled
because I could not remember right off the head (I later remembered that "in" must
be because it is used in a "for" loop).
It would be nice if we could ask ruby itself which keywords would be available,
i.e. stored in an array.
http://ruby-doc.org/docs/keywords/1.9/ has a nice description of all keywords
too, which is great.
Updated by zzak (zzak _) almost 11 years ago
- Category set to doc
- Status changed from Open to Assigned
- Assignee set to zzak (zzak _)
- Priority changed from 3 to Normal
Updated by zzak (zzak _) over 10 years ago
- Status changed from Assigned to Closed
ActionsLike0