method
local_constant_names
v4.0.2 -
Show latest stable
- Class:
Module
local_constant_names()public
DEPRECATED: Use local_constants instead.
Returns the names of the constants defined locally as strings.
module M X = 1 end M.local_constant_names # => ["X"]
This method is useful for forward compatibility, since Ruby 1.8 returns constant names as strings, whereas 1.9 returns them as symbols.