Flowdock
method

local_constant_names

Importance_1
v4.0.2 - Show latest stable - 0 notes - 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.

Show source
Register or log in to add new notes.