mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* range.c: fix SEGV by ("a" .. "z").step(2 ** 30) { }.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e1b85cbf17
commit
45ef2e8ef2
2 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Jan 29 22:27:11 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* range.c: fix SEGV by ("a" .. "z").step(2 ** 30) { }.
|
||||
|
||||
Tue Jan 29 21:59:16 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* enc/euc_tw.c (euctw_islead): 0x8e is a leading byte.
|
||||
|
|
3
range.c
3
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);
|
||||
|
|
Loading…
Reference in a new issue