Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Override new on proxy objects so that they never wrap nil or false.

  • Loading branch information...
commit a9ef2fd56c3f2a20e2b6e3f9b607efa0fc03271c 1 parent ae63d5c
@texel texel authored tenderlove committed
Showing with 7 additions and 0 deletions.
  1. +7 −0 activesupport/lib/active_support/deprecation.rb
View
7 activesupport/lib/active_support/deprecation.rb
@@ -120,6 +120,13 @@ def deprecation_horizon
end
class DeprecationProxy #:nodoc:
+ def self.new(*args, &block)
+ object = args.first
+
+ return object unless object
+ super
+ end
+
silence_warnings do
instance_methods.each { |m| undef_method m unless m =~ /^__/ }
end
Please sign in to comment.
Something went wrong with that request. Please try again.