On 17 Oct 2008, at 15:40, David Roderick wrote:
> > Ruby 1.9 does not work with rails. My ruby1.9 cannot work with rails > and > produces an error message about == and >= so why not remove these ? > an error? what error :-) > In activesupport/lib/active_support module ActiveSupport is the > following > > module ActiveSupport > if defined? ::BasicObject > 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 -~----------~----~----~----~------~----~------~--~---
