Range Patch

I have tidied up and completed the implementation of Range. Once
tokenizing is working correctly and a bug #17448
atid=16798> , regarding Kernel#respond_to?, Is fixed then all the specs
pass. The relevant specs that fail in these cases have been excluded.

. Range#step and Range#each have a lot of common functionality
this has been factored out; both have a number of specialized algorithms
depending on what kind of objects Range#begin and Range#end are. I have
modified the specs for these accordingly and I will see if I can pass
on to the guys in Rubinius.

. I have added Protocols.TryCompare because it was needed for

. There were some problems between creating literal Ranges (i.e.
2…4) and explicitly creating them (i.e. Range.new(2,4,true)). This is
solved, even for derived classes (i.e. class Range2 < Range … end).

The patch is run against r74 at the trunk level.

Hope this all works,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs