diff options
Diffstat (limited to 'activesupport/lib/active_support/deprecation.rb')
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index 01eb5df593..950bca60a6 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -109,7 +109,7 @@ module ActiveSupport end def deprecation_horizon - '2.0' + '2.3' end end @@ -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: |