mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* range.c (range_each): use INT2FIX() for fixnum values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6f63456ed7
commit
cb2bfadd2d
2 changed files with 5 additions and 1 deletions
|
@ -134,6 +134,10 @@ Sat Apr 26 00:47:43 2008 Tanaka Akira <akr@fsij.org>
|
||||||
(rb_f_system): call rb_spawn_internal with default_close_others as
|
(rb_f_system): call rb_spawn_internal with default_close_others as
|
||||||
false.
|
false.
|
||||||
|
|
||||||
|
Sat Apr 26 12:26:41 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* range.c (range_each): use INT2FIX() for fixnum values.
|
||||||
|
|
||||||
Fri Apr 25 17:56:25 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Apr 25 17:56:25 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* gc.c (free_unused_heaps): preserve last used heap segment to
|
* gc.c (free_unused_heaps): preserve last used heap segment to
|
||||||
|
|
2
range.c
2
range.c
|
@ -421,7 +421,7 @@ range_each(VALUE range)
|
||||||
if (!EXCL(range))
|
if (!EXCL(range))
|
||||||
lim += 1;
|
lim += 1;
|
||||||
for (i = FIX2LONG(beg); i < lim; i++) {
|
for (i = FIX2LONG(beg); i < lim; i++) {
|
||||||
rb_yield(LONG2NUM(i));
|
rb_yield(LONG2FIX(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (TYPE(beg) == T_STRING) {
|
else if (TYPE(beg) == T_STRING) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue