From ad5f18e6e936e783e0e97a9315ed4a72f333a2cd Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Tue, 11 Sep 2012 23:05:19 -0400 Subject: Nice and easy delegation to the class --- activesupport/lib/active_support/core_ext/module/delegation.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activesupport/lib/active_support/core_ext') diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index 39a1240c61..8703587243 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -123,6 +123,9 @@ class Module file, line = caller.first.split(':', 2) line = line.to_i + to = to.to_s + to = 'self.class' if to == 'class' + methods.each do |method| # Attribute writer methods only accept one argument. Makes sure []= # methods still accept two arguments. -- cgit v1.2.3