Permalink
Browse files

removes the compatibility method Module#instance_method_names

  • Loading branch information...
1 parent 4e1999d commit 40bda760675f7cd05d44c66c6daf1f95161a15de @fxn fxn committed Dec 25, 2011
@@ -5,7 +5,6 @@
require 'action_view/helpers/active_model_helper'
require 'active_support/core_ext/class/attribute'
require 'active_support/core_ext/hash/slice'
-require 'active_support/core_ext/module/method_names'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/string/output_safety'
require 'active_support/core_ext/array/extract_options'
@@ -1232,7 +1231,7 @@ def sanitized_method_name
class FormBuilder
# The methods which wrap a form helper call.
class_attribute :field_helpers
- self.field_helpers = FormHelper.instance_method_names - %w(form_for convert_to_model)
+ self.field_helpers = FormHelper.instance_methods - [:form_for, :convert_to_model]
attr_accessor :object_name, :object, :options
@@ -1,7 +1,10 @@
## Rails 4.0.0 (unreleased) ##
-* BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger
- from Ruby stdlib.
+* Deletes the compatibility method Module#instance_method_names,
+ use Module#instance_methods from now on (which returns symbols). *fxn*
+
+* BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger
+ from Ruby stdlib.
## Rails 3.2.0 (unreleased) ##
@@ -1,8 +1,4 @@
class Module
- def instance_method_names(*args)
- instance_methods(*args).map { |name| name.to_s }
- end
-
def method_names(*args)
methods(*args).map { |name| name.to_s }
end
@@ -937,13 +937,7 @@ NOTE: Defined in +active_support/core_ext/module/delegation.rb+
h4. Method Names
-The builtin methods +instance_methods+ and +methods+ return method names as strings or symbols depending on the Ruby version. Active Support defines +instance_method_names+ and +method_names+ to be equivalent to them, respectively, but always getting strings back.
-
-For example, +ActionView::Helpers::FormBuilder+ knows this array difference is going to work no matter the Ruby version:
-
-<ruby>
-self.field_helpers = (FormHelper.instance_method_names - ['form_for'])
-</ruby>
+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+

0 comments on commit 40bda76

Please sign in to comment.