mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* enumerator.c (enumerator_with_index): Restore handling of a nil memo
from r39594. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b4a117f8d3
commit
6c77ae07a5
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Mar 5 12:24:23 2013 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* enumerator.c (enumerator_with_index): Restore handling of a nil memo
|
||||
from r39594.
|
||||
|
||||
Tue Mar 5 10:40:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/objspace/objspace.c (count_nodes): count also newly added nodes,
|
||||
|
|
|
@ -492,6 +492,8 @@ enumerator_with_index(int argc, VALUE *argv, VALUE obj)
|
|||
|
||||
rb_scan_args(argc, argv, "01", &memo);
|
||||
RETURN_SIZED_ENUMERATOR(obj, argc, argv, enumerator_size);
|
||||
if (NIL_P(memo))
|
||||
memo = INT2NUM(0);
|
||||
return enumerator_block_call(obj, enumerator_with_index_i, (VALUE)&memo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue