aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb3
-rw-r--r--activesupport/CHANGELOG.md7
-rw-r--r--activesupport/lib/active_support/core_ext/module/method_names.rb4
-rw-r--r--railties/guides/source/active_support_core_extensions.textile8
4 files changed, 7 insertions, 15 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index ffb5a729ed..5a301ca9b1 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -5,7 +5,6 @@ require 'action_view/helpers/form_tag_helper'
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 @@ module ActionView
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
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 50c83478d1..19aea0b27e 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -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) ##
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 72d7091eb1..1de3089ac6 100644
--- a/activesupport/lib/active_support/core_ext/module/method_names.rb
+++ b/activesupport/lib/active_support/core_ext/module/method_names.rb
@@ -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
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 7cd241f412..f10830e0c6 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -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+