aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-05-06 12:16:55 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-05-06 12:16:55 +0100
commit63e8bcaeb31443cecc5bef5762a45643cc12d481 (patch)
tree57800132eecace875b1701b79883d179dfb8c021 /activesupport/lib
parent4a0118d7278687b534edf1e1184d6858cb4d29b8 (diff)
parente520fd5db7cb839b862c03647effee50f9223d98 (diff)
downloadrails-63e8bcaeb31443cecc5bef5762a45643cc12d481.tar.gz
rails-63e8bcaeb31443cecc5bef5762a45643cc12d481.tar.bz2
rails-63e8bcaeb31443cecc5bef5762a45643cc12d481.zip
Merge commit 'mainstream/master'
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/deprecation.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index c9f1884da3..7613652c71 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -175,6 +175,20 @@ module ActiveSupport
ActiveSupport::Deprecation.warn("#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}", callstack)
end
end
+
+ class DeprecatedInstanceVariable < Delegator #:nodoc:
+ def initialize(value, method)
+ super(value)
+ @method = method
+ @value = value
+ end
+
+ def __getobj__
+ ActiveSupport::Deprecation.warn("Instance variable @#{@method} is deprecated! Call instance method #{@method} instead.")
+ @value
+ end
+ end
+
end
end