ruby-changes:29636
From: nobu <ko1@a...>
Date: Fri, 28 Jun 2013 13:26:31 +0900 (JST)
Subject: [ruby-changes:29636] nobu:r41688 (trunk): enumerator.c: lazyenum_size
nobu 2013-06-28 13:26:21 +0900 (Fri, 28 Jun 2013) New Revision: 41688 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41688 Log: enumerator.c: lazyenum_size * enumerator.c (lazyenum_size): adjust arguments. * enumerator.c (enumerable_lazy): use lazyenum_size() instead of enum_size(). Modified files: trunk/enumerator.c Index: enumerator.c =================================================================== --- enumerator.c (revision 41687) +++ enumerator.c (revision 41688) @@ -1260,6 +1260,12 @@ enum_size(VALUE self) https://github.com/ruby/ruby/blob/trunk/enumerator.c#L1260 } static VALUE +lazyenum_size(VALUE self, VALUE args, VALUE eobj) +{ + return enum_size(self); +} + +static VALUE lazy_size(VALUE self) { return enum_size(rb_ivar_get(self, id_receiver)); @@ -1405,7 +1411,7 @@ lazy_set_method(VALUE lazy, VALUE args, https://github.com/ruby/ruby/blob/trunk/enumerator.c#L1411 static VALUE enumerable_lazy(VALUE obj) { - VALUE result = lazy_to_enum_i(obj, sym_each, 0, 0, enum_size); + VALUE result = lazy_to_enum_i(obj, sym_each, 0, 0, lazyenum_size); /* Qfalse indicates that the Enumerator::Lazy has no method name */ rb_ivar_set(result, id_method, Qfalse); return result; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/