public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/jeremy/rails.git
Search Repo:
Ruby 1.9 compat: define __setobj__ for Delegator
jeremy (author)
Sat May 10 08:47:06 -0700 2008
commit  828914a062d3fd6cd51ebd3881acea11eede45cc
tree    e57972e4bc72dcf0817c028f67b6afb1d47f3bd4
parent  d2212c1601dcd67e72e9d52f98347d3285fd7134
...
178
179
180
181
182
183
 
 
184
185
186
187
188
 
 
 
 
189
190
191
...
178
179
180
 
181
 
182
183
184
185
186
187
188
189
190
191
192
193
194
195
0
@@ -178,14 +178,18 @@
0
 
0
     class DeprecatedInstanceVariable < Delegator #:nodoc:
0
       def initialize(value, method)
0
- super(value)
0
         @method = method
0
- @value = value
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
 

Comments

    No one has commented yet.