public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Remove unnecessary DeprecatedInstanceVariable class
lifo (author)
Tue May 13 02:39:45 -0700 2008
commit  2270371f5dbabdd25ffcc59389249a795ba324a1
tree    2f03fe4fbc3b6128e918a3f1ed62efc40088452d
parent  593e21d6aedcc05d744be4996bd7180edce57efe
...
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
...
176
177
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
180
181
0
@@ -176,23 +176,6 @@
0
         end
0
     end
0
 
0
- class DeprecatedInstanceVariable < Delegator #:nodoc:
0
- def initialize(value, method)
0
- @method = method
0
- super(value)
0
- __setobj__(value)
0
- end
0
-
0
- def __getobj__
0
- ActiveSupport::Deprecation.warn("Instance variable @#{@method} is deprecated! Call instance method #{@method} instead.")
0
- @value
0
- end
0
-
0
- def __setobj__(value)
0
- @value = value
0
- end
0
- end
0
-
0
   end
0
 end
0
 
...
149
150
151
152
153
154
155
156
157
158
159
160
161
...
149
150
151
 
 
 
 
 
 
 
 
 
 
0
@@ -149,14 +149,4 @@
0
     assert_nil @last_message
0
   end
0
 end
0
-
0
-class DeprecatedIvarTest < Test::Unit::TestCase
0
-
0
- def test_deprecated_ivar
0
- @action = ActiveSupport::Deprecation::DeprecatedInstanceVariable.new("fubar", :foobar)
0
-
0
- assert_deprecated(/Instance variable @foobar is deprecated! Call instance method foobar instead/) { assert_equal "fubar", @action }
0
- end
0
-
0
-end

Comments

    No one has commented yet.