diff --git a/ChangeLog b/ChangeLog index 3146797a3d..8054265be4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Jan 29 22:27:11 2008 Yusuke Endoh + + * range.c: fix SEGV by ("a" .. "z").step(2 ** 30) { }. + Tue Jan 29 21:59:16 2008 Tanaka Akira * enc/euc_tw.c (euctw_islead): 0x8e is a leading byte. diff --git a/range.c b/range.c index 7999283b95..cc254d660a 100644 --- a/range.c +++ b/range.c @@ -252,8 +252,7 @@ step_i(VALUE i, void *arg) iter[0] -= INT2FIX(1) & ~FIXNUM_FLAG; } else { - VALUE one = INT2FIX(1); - iter[0] = rb_funcall(iter[0], '-', 1, &one); + iter[0] = rb_funcall(iter[0], '-', 1, INT2FIX(1)); } if (iter[0] == INT2FIX(0)) { rb_yield(i);