summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--range.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 084d8f9f30..c58556870e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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?.
diff --git a/range.c b/range.c
index ee36057fef..1e627bdaa0 100644
--- a/range.c
+++ b/range.c
@@ -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);
}