diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | range.c | 5 |
2 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Wed Dec 5 23:38:50 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * range.c (range_each): followed step_i change. + Wed Dec 5 18:08:45 2007 Tanaka Akira <akr@fsij.org> * numeric.c (int_odd_p): new method Integer#odd?. @@ -428,11 +428,10 @@ range_each(range) } } else if (TYPE(beg) == T_STRING) { - VALUE args[5]; - long iter[2]; + VALUE args[5], iter[2]; args[0] = beg; args[1] = end; args[2] = range; - iter[0] = 1; iter[1] = 1; + iter[0] = INT2FIX(1); iter[1] = INT2FIX(1); rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i, (VALUE)iter); } |