From 32844cbc025b394ecd0b9fe2fd755b4e5b6cd4e7 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 26 Jul 2010 09:57:29 -0700 Subject: fixing space errors --- activesupport/lib/active_support/deprecation/proxy_wrappers.rb | 4 ++-- activesupport/test/deprecation/proxy_wrappers_test.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb index b22d0a6941..deb33ab702 100644 --- a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb @@ -5,11 +5,11 @@ module ActiveSupport class DeprecationProxy #:nodoc: def self.new(*args, &block) object = args.first - + return object unless object super end - + instance_methods.each { |m| undef_method m unless m =~ /^__|^object_id$/ } # Don't give a deprecation warning on inspect since test/unit and error diff --git a/activesupport/test/deprecation/proxy_wrappers_test.rb b/activesupport/test/deprecation/proxy_wrappers_test.rb index c507eff38e..aa887f274d 100644 --- a/activesupport/test/deprecation/proxy_wrappers_test.rb +++ b/activesupport/test/deprecation/proxy_wrappers_test.rb @@ -4,19 +4,19 @@ require 'active_support/deprecation' class ProxyWrappersTest < Test::Unit::TestCase Waffles = false NewWaffles = :hamburgers - + def test_deprecated_object_proxy_doesnt_wrap_falsy_objects proxy = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(nil, "message") assert !proxy end - + def test_deprecated_instance_variable_proxy_doesnt_wrap_falsy_objects proxy = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(nil, :waffles) assert !proxy end - + def test_deprecated_constant_proxy_doesnt_wrap_falsy_objects proxy = ActiveSupport::Deprecation::DeprecatedConstantProxy.new(Waffles, NewWaffles) assert !proxy end -end \ No newline at end of file +end -- cgit v1.2.3