>> In activesupport/lib/active_support module ActiveSupport is the >> following >> >> module ActiveSupport >> if defined? ::BasicObject if Object::BasicObject We are looking for a constant in scope of object. Is this correct? It seems to me that BasicObject::Object is the correct order. I have not ruby1.9 at the moment to check this.
>> class BasicObject < ::BasicObject >> undef_method :== >> undef_method :equal? >> >> # Let ActiveSupport::BasicObject at least raise exceptions. >> def raise(*args) >> ::Object.send(:raise, *args) >> end >> end >> else >> require 'blankslate' >> BasicObject = BlankSlate >> end >> end >> >> For a start the method as equal? means a.object_id == b.object_id >> Getting rid of it seems a mistake >> Further the Object.eql? and Object.== are both Object.equal? and the >> former two are often redefined at children of object. >> > The intent of things like BasicObject is for use as proxies. You want > almost everything undefined on these, because you almost always want > to forward things like == onto the proxy target. > In pseudo code what this is doing is 'if ruby has a BasicObject class, > then define ActiveSupport::BasicObject to be like it, if not use blank > slate'. > Applications (and rails itself) can then use > ActiveSupport::BasicObject without having to worry about whether > ruby's BasicObject exists or not. > ruby 1.9 is a shifting target so stuff may have broken. > > Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
