Skip to content

Commit

Permalink
fixing space errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jul 26, 2010
1 parent c819c13 commit 32844cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -5,11 +5,11 @@ module Deprecation
class DeprecationProxy #:nodoc: class DeprecationProxy #:nodoc:
def self.new(*args, &block) def self.new(*args, &block)
object = args.first object = args.first

return object unless object return object unless object
super super
end end

instance_methods.each { |m| undef_method m unless m =~ /^__|^object_id$/ } instance_methods.each { |m| undef_method m unless m =~ /^__|^object_id$/ }


# Don't give a deprecation warning on inspect since test/unit and error # Don't give a deprecation warning on inspect since test/unit and error
Expand Down
8 changes: 4 additions & 4 deletions activesupport/test/deprecation/proxy_wrappers_test.rb
Expand Up @@ -4,19 +4,19 @@
class ProxyWrappersTest < Test::Unit::TestCase class ProxyWrappersTest < Test::Unit::TestCase
Waffles = false Waffles = false
NewWaffles = :hamburgers NewWaffles = :hamburgers

def test_deprecated_object_proxy_doesnt_wrap_falsy_objects def test_deprecated_object_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(nil, "message") proxy = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(nil, "message")
assert !proxy assert !proxy
end end

def test_deprecated_instance_variable_proxy_doesnt_wrap_falsy_objects def test_deprecated_instance_variable_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(nil, :waffles) proxy = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(nil, :waffles)
assert !proxy assert !proxy
end end

def test_deprecated_constant_proxy_doesnt_wrap_falsy_objects def test_deprecated_constant_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedConstantProxy.new(Waffles, NewWaffles) proxy = ActiveSupport::Deprecation::DeprecatedConstantProxy.new(Waffles, NewWaffles)
assert !proxy assert !proxy
end end
end end

0 comments on commit 32844cb

Please sign in to comment.