[Ironruby-core] Range Patch

Peter Bacon Darwin bacondarwin at googlemail.com
Thu Jan 24 16:44:16 EST 2008


I have tidied up and completed the implementation of Range.   Once Bignum
tokenizing is working correctly and a bug #17448
<http://rubyforge.org/tracker/index.php?func=detail&aid=17448&group_id=4359&
atid=16798> , regarding Kernel#respond_to?, Is fixed then all the specs will
pass.   The relevant specs that fail in these cases have been excluded.

 

.         Range#step and Range#each have a lot of common functionality so
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 them
on to the guys in Rubinius.

.         I have added Protocols.TryCompare because it was needed for
Range#===.

.         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 now
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,

Pete

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080124/e1170da5/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RangePatch.patch
Type: application/octet-stream
Size: 40266 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20080124/e1170da5/attachment-0001.obj 


More information about the Ironruby-core mailing list