Browse files

removes the compatibility method Module#method_names

  • Loading branch information...
1 parent 40bda76 commit 748725e9ce081f6517c68d8f74d254e2079d0d79 @fxn fxn committed Dec 25, 2011
View
3 activesupport/CHANGELOG.md
@@ -1,5 +1,8 @@
## Rails 4.0.0 (unreleased) ##
+* Deletes the compatibility method Module#method_names,
+ use Module#methods from now on (which returns symbols). *fxn*
+
* Deletes the compatibility method Module#instance_method_names,
use Module#instance_methods from now on (which returns symbols). *fxn*
View
1 activesupport/lib/active_support/core_ext/module.rb
@@ -7,5 +7,4 @@
require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/deprecation'
require 'active_support/core_ext/module/remove_method'
-require 'active_support/core_ext/module/method_names'
require 'active_support/core_ext/module/qualified_const'
View
5 activesupport/lib/active_support/core_ext/module/method_names.rb
@@ -1,5 +0,0 @@
-class Module
- def method_names(*args)
- methods(*args).map { |name| name.to_s }
- end
-end
View
1 activesupport/lib/active_support/ruby/shim.rb
@@ -17,4 +17,3 @@
require 'active_support/core_ext/rexml'
require 'active_support/core_ext/time/conversions'
require 'active_support/core_ext/file/path'
-require 'active_support/core_ext/module/method_names'
View
6 railties/guides/source/active_support_core_extensions.textile
@@ -935,12 +935,6 @@ In the previous example the macro generates +avatar_size+ rather than +size+.
NOTE: Defined in +active_support/core_ext/module/delegation.rb+
-h4. Method Names
-
-The builtin method +methods+ returns method names as strings or symbols depending on the Ruby version. Active Support defines +method_names+ to be equivalent, but always getting strings back.
-
-NOTE: Defined in +active_support/core_ext/module/method_names.rb+
-
h4. Redefining Methods
There are cases where you need to define a method with +define_method+, but don't know whether a method with that name already exists. If it does, a warning is issued if they are enabled. No big deal, but not clean either.

0 comments on commit 748725e

Please sign in to comment.