From a5587efc1903fd27d4b179753aa6e139445ad18c Mon Sep 17 00:00:00 2001 From: wycats Date: Wed, 17 Mar 2010 00:15:55 -0700 Subject: Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM warnings are in dependencies. --- .../lib/active_support/core_ext/module/method_names.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 activesupport/lib/active_support/core_ext/module/method_names.rb (limited to 'activesupport/lib/active_support/core_ext/module/method_names.rb') diff --git a/activesupport/lib/active_support/core_ext/module/method_names.rb b/activesupport/lib/active_support/core_ext/module/method_names.rb new file mode 100644 index 0000000000..2eb40a83ab --- /dev/null +++ b/activesupport/lib/active_support/core_ext/module/method_names.rb @@ -0,0 +1,14 @@ +class Module + if instance_methods[0].is_a?(Symbol) + def instance_method_names(*args) + instance_methods(*args).map(&: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 + end +end \ No newline at end of file -- cgit v1.2.3