From: Michal Rokos Date: 2002-04-30T18:05:12+09:00 Subject: Re: [RFC] Ranges - enable (10..-10) In article <1020155811.294677.24806.nullmailer@picachu.netlab.jp>, Yukihiro Matsumoto wrote: > Agrred. They will be merged. Thank you. Great! Here is the patch that applies clearly to current Ruby... Michal Index: range.c =================================================================== RCS file: /src/ruby/range.c,v retrieving revision 1.32 diff -u -r1.32 range.c --- range.c 2002/04/24 04:54:14 1.32 +++ range.c 2002/04/30 08:44:46 @@ -78,7 +78,7 @@ rb_name_error(rb_intern("initialized"), "`initialize' called twice"); } range_init(obj, beg, end, RTEST(flags)); - return Qnil; + return obj; } static VALUE @@ -231,59 +231,6 @@ } static VALUE -range_each(range) - VALUE range; -{ - VALUE b, e; - - b = rb_ivar_get(range, id_beg); - e = rb_ivar_get(range, id_end); - - if (FIXNUM_P(b) && FIXNUM_P(e)) { /* fixnums are special */ - long end = FIX2LONG(e); - long i; - - if (!EXCL(range)) end += 1; - for (i=FIX2LONG(b); i