aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-08-18 13:43:07 -0400
committerJosé Valim <jose.valim@gmail.com>2010-09-01 09:57:13 +0200
commitcacb44874fd5dad608268325b00b4c0058950420 (patch)
treebed8811a71e5ac4aa099672cedbb17e56bd7d4f3 /activesupport/lib/active_support/core_ext/module
parent9a6e3ae76322e0a8108f9bcf0a8440769328b9d7 (diff)
downloadrails-cacb44874fd5dad608268325b00b4c0058950420.tar.gz
rails-cacb44874fd5dad608268325b00b4c0058950420.tar.bz2
rails-cacb44874fd5dad608268325b00b4c0058950420.zip
delegate method should treat :prefix => false same as :prefix => nil
[#5375 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
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 40a1866428..3a7652f5bf 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -113,7 +113,7 @@ class Module
raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method."
end
- prefix = options[:prefix] && "#{options[:prefix] == true ? to : options[:prefix]}_"
+ prefix = options[:prefix] && "#{options[:prefix] == true ? to : options[:prefix]}_" || ''
file, line = caller.first.split(':', 2)
line = line.to_i