lib/active_support/deprecation.rb in activesupport-2.3.8 vs lib/active_support/deprecation.rb in activesupport-2.3.9.pre
- old
+ new
@@ -118,9 +118,16 @@
'2.3'
end
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
# Don't give a deprecation warning on inspect since test/unit and error