aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-26 09:57:29 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-26 09:58:35 -0700
commit32844cbc025b394ecd0b9fe2fd755b4e5b6cd4e7 (patch)
treec7ce1216c0f243de6ad0dd2593e2305db4eabb6b
parentc819c131f2d08a8c9089a6ef0dcadcf912e2538c (diff)
downloadrails-32844cbc025b394ecd0b9fe2fd755b4e5b6cd4e7.tar.gz
rails-32844cbc025b394ecd0b9fe2fd755b4e5b6cd4e7.tar.bz2
rails-32844cbc025b394ecd0b9fe2fd755b4e5b6cd4e7.zip
fixing space errors
-rw-r--r--activesupport/lib/active_support/deprecation/proxy_wrappers.rb4
-rw-r--r--activesupport/test/deprecation/proxy_wrappers_test.rb8
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