aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/deprecation.rb1
-rw-r--r--activesupport/test/deprecation_test.rb7
2 files changed, 3 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index 2e92cbfbf3..d7acdc2bd8 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -78,7 +78,6 @@ module ActiveSupport
def initialize(instance, method, var = "@#{method}")
@instance, @method, @var = instance, method, var
- deprecation_warning :initialize, caller
end
private
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb
index 48506656a5..319bd231d7 100644
--- a/activesupport/test/deprecation_test.rb
+++ b/activesupport/test/deprecation_test.rb
@@ -68,9 +68,8 @@ class DeprecationTest < Test::Unit::TestCase
def test_deprecated_instance_variable_proxy
assert_not_deprecated { @dtc.request.size }
- assert_deprecated('Using @request directly is deprecated - call request instead.') do
- assert_equal @dtc.request.size, @dtc.old_request.size
- assert_equal @dtc.request.to_s, @dtc.old_request.to_s
- end
+ warning = 'Using @request directly is deprecated - call request instead.'
+ assert_deprecated(warning) { assert_equal @dtc.request.size, @dtc.old_request.size }
+ assert_deprecated(warning) { assert_equal @dtc.request.to_s, @dtc.old_request.to_s }
end
end