aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module
diff options
context:
space:
mode:
authorKrzysztof Zych <krzysztof.zych@rebased.pl>2017-07-05 15:38:54 +0200
committerKrzysztof Zych <krzysztof.zych@rebased.pl>2017-07-05 15:38:54 +0200
commit8eea74c965b0f66eac3848f1eaaf495d5dc1092e (patch)
treefc890557706e3a17a073ae8a6e699f4c9a4b1f8d /activesupport/lib/active_support/core_ext/module
parent990a4dbbca5b7a8cf3d01861cb66deae456d370e (diff)
downloadrails-8eea74c965b0f66eac3848f1eaaf495d5dc1092e.tar.gz
rails-8eea74c965b0f66eac3848f1eaaf495d5dc1092e.tar.bz2
rails-8eea74c965b0f66eac3848f1eaaf495d5dc1092e.zip
Use `map` in `delegate` so that actual prefixed method names are returned, if using prefix version.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module')
-rw-r--r--activesupport/lib/active_support/core_ext/module/delegation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb
index 04f34e553d..13bb8070ae 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -174,7 +174,7 @@ class Module
to = to.to_s
to = "self.#{to}" if DELEGATION_RESERVED_METHOD_NAMES.include?(to)
- methods.each do |method|
+ methods.map do |method|
# Attribute writer methods only accept one argument. Makes sure []=
# methods still accept two arguments.
definition = /[^\]]=$/.match?(method) ? "arg" : "*args, &block"