diff --git a/activesupport/lib/active_support/core_ext/module/method_names.rb b/activesupport/lib/active_support/core_ext/module/method_names.rb index 2eb40a83abc7472054d62195abf5c8f7e1795f2d..72d7091eb109d0a7aa44cf50502104a778d0abb0 100644 --- a/activesupport/lib/active_support/core_ext/module/method_names.rb +++ b/activesupport/lib/active_support/core_ext/module/method_names.rb @@ -1,14 +1,9 @@ class Module - if instance_methods[0].is_a?(Symbol) - def instance_method_names(*args) - instance_methods(*args).map(&:to_s) - end + def instance_method_names(*args) + instance_methods(*args).map { |name| name.to_s } + end - def method_names(*args) - methods(*args).map(&:to_s) - end - else - alias_method :instance_method_names, :instance_methods - alias_method :method_names, :methods + def method_names(*args) + methods(*args).map { |name| name.to_s } end -end \ No newline at end of file +end