From 8eea74c965b0f66eac3848f1eaaf495d5dc1092e Mon Sep 17 00:00:00 2001 From: Krzysztof Zych Date: Wed, 5 Jul 2017 15:38:54 +0200 Subject: Use `map` in `delegate` so that actual prefixed method names are returned, if using prefix version. --- activesupport/lib/active_support/core_ext/module/delegation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/module') 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" -- cgit v1.2.3