From 2bf8f2307e3f13a7b6cf703cdb954cc9a3f5244d Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Mon, 7 Aug 2006 06:10:34 +0000
Subject: Don't warn when the deprecated ivar proxy is instantiated.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
---
 activesupport/lib/active_support/deprecation.rb | 1 -
 activesupport/test/deprecation_test.rb          | 7 +++----
 2 files changed, 3 insertions(+), 5 deletions(-)

(limited to 'activesupport')

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
-- 
cgit v1.2.3