aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-09-01 16:09:37 +0930
committerGitHub <noreply@github.com>2017-09-01 16:09:37 +0930
commitd0d7ce001bdbb0e5551da881caf8156c06238b84 (patch)
treedc9ed4628ea1e6f5d0f0591d76ac7024ca147814 /guides/source
parent2cd8ac1b68ba04ca12a816c8113271017b3c43c4 (diff)
parent50dbf817d43569c54300827b5f88702eba12dad6 (diff)
downloadrails-d0d7ce001bdbb0e5551da881caf8156c06238b84.tar.gz
rails-d0d7ce001bdbb0e5551da881caf8156c06238b84.tar.bz2
rails-d0d7ce001bdbb0e5551da881caf8156c06238b84.zip
Merge pull request #29233 from matthewd/redefine-method
Clarify intentions around method redefinitions
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_support_core_extensions.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 9f89e666dc..b43d13b804 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -864,7 +864,11 @@ There are cases where you need to define a method with `define_method`, but don'
The method `redefine_method` prevents such a potential warning, removing the existing method before if needed.
-NOTE: Defined in `active_support/core_ext/module/remove_method.rb`.
+You can also use `silence_redefinition_of_method` if you need to define
+the replacement method yourself (because you're using `delegate`, for
+example).
+
+NOTE: Defined in `active_support/core_ext/module/redefine_method.rb`.
Extensions to `Class`
---------------------