Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove unnecessary DeprecatedInstanceVariable class

  • Loading branch information...
commit 2270371f5dbabdd25ffcc59389249a795ba324a1 1 parent 593e21d
@lifo lifo authored
View
17 activesupport/lib/active_support/deprecation.rb
@@ -176,23 +176,6 @@ def warn(callstack, called, args)
end
end
- class DeprecatedInstanceVariable < Delegator #:nodoc:
- def initialize(value, method)
- @method = method
- super(value)
- __setobj__(value)
- end
-
- def __getobj__
- ActiveSupport::Deprecation.warn("Instance variable @#{@method} is deprecated! Call instance method #{@method} instead.")
- @value
- end
-
- def __setobj__(value)
- @value = value
- end
- end
-
end
end
View
10 activesupport/test/deprecation_test.rb
@@ -149,13 +149,3 @@ def message
assert_nil @last_message
end
end
-
-class DeprecatedIvarTest < Test::Unit::TestCase
-
- def test_deprecated_ivar
- @action = ActiveSupport::Deprecation::DeprecatedInstanceVariable.new("fubar", :foobar)
-
- assert_deprecated(/Instance variable @foobar is deprecated! Call instance method foobar instead/) { assert_equal "fubar", @action }
- end
-
-end
Please sign in to comment.
Something went wrong with that request. Please try again.