diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-28 11:47:06 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-28 11:47:06 -0700 |
commit | ce4d13861dc54a1ac7fbe411327b9a2427f95366 (patch) | |
tree | 54863b03010dbbc4f729bc600b8e83f54e460c71 /activesupport/lib | |
parent | 293f99700d6f2388ea5c504d706651ff3044d733 (diff) | |
parent | acbf2b74aa3001fb6064bba96cd0033495774357 (diff) | |
download | rails-ce4d13861dc54a1ac7fbe411327b9a2427f95366.tar.gz rails-ce4d13861dc54a1ac7fbe411327b9a2427f95366.tar.bz2 rails-ce4d13861dc54a1ac7fbe411327b9a2427f95366.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index 01eb5df593..e543163bd5 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -162,6 +162,22 @@ module ActiveSupport end end + class DeprecatedObjectProxy < DeprecationProxy + def initialize(object, message) + @object = object + @message = message + end + + private + def target + @object + end + + def warn(callstack, called, args) + ActiveSupport::Deprecation.warn(@message, callstack) + end + end + # Stand-in for <tt>@request</tt>, <tt>@attributes</tt>, <tt>@params</tt>, etc. # which emits deprecation warnings on any method call (except +inspect+). class DeprecatedInstanceVariableProxy < DeprecationProxy #:nodoc: |