class Module

def local_constant_names

constant names as strings, whereas 1.9 returns them as symbols.
This method is useful for forward compatibility, since Ruby 1.8 returns

M.local_constant_names # => ["X"]
end
X = 1
module M

Returns the names of the constants defined locally as strings.

*DEPRECATED*: Use +local_constants+ instead.
def local_constant_names
  ActiveSupport::Deprecation.warn 'Module#local_constant_names is deprecated, use Module#local_constants instead'
  local_constants.map { |c| c.to_s }
end