On 9 Nov 2008, at 20:19, Geoff B wrote:

>
> Good point about object equality -- #is_a? comparisons wouldn't work
> as expected, either.
>
> Note that this is an existing problem; it's not specific to Tom Lea's
> patch. But it does demonstrate that objects kept around between
> requests will never work exactly as you'd expect them to.

The key here is that they do behave as expected in production. There  
is nothing inherently wrong about keeping instances between requests.  
It works, and it works well, just not with the odd behaviour unique to  
AR.

The same reload behaviour described in previous posts effects any  
constant defined via a require_dependancy. It is only the deletion of  
methods and class attributes on AR instances that I am questioning,  
and that is all this patch addresses.

> I suppose the only fix for this would be, remove all instance methods
> from AR instances, including methods defined in superclasses, in
> AR::Base.reset_subclasses, and implement a method_missing with an
> informative error, as you suggest.

If this is indeed the aim, should the same logic apply to instances of  
other classes?

I fear this is a bridge too far.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to