[MacRuby-devel] [MacRuby] #817: External iterators returning nil

MacRuby ruby-noreply at macosforge.org
Sun Aug 1 06:53:09 PDT 2010


#817: External iterators returning nil
-----------------------------------+----------------------------------------
 Reporter:  kennylovrin@…          |       Owner:  lsansonetti@…        
     Type:  defect                 |      Status:  new                  
 Priority:  minor                  |   Milestone:                       
Component:  MacRuby                |    Keywords:                       
-----------------------------------+----------------------------------------

Comment(by watson1978@…):

 It seems that the external iterator is not yet implemented.[[BR]]
 The external iterator is being disabled. [[BR]]

 enumerator.c:415
 {{{
 #if 0
 static VALUE
 next_ii(VALUE i, VALUE obj, int argc, VALUE *argv)
 {
     rb_fiber_yield(argc, argv);
     return Qnil;
 }

 static VALUE
 next_i(VALUE curr, VALUE obj)
 {
     struct enumerator *e = enumerator_ptr(obj);
     VALUE rnil = Qnil;

     rb_block_call(obj, rb_intern("each"), 0, 0, next_ii, obj);
     e->no_next = Qtrue;
     return rb_fiber_yield(1, &rnil);
 }

 static void
 next_init(VALUE obj, struct enumerator *e)
 {
     VALUE curr = rb_fiber_current();
     e->dst = curr;
     e->fib = rb_fiber_new(next_i, obj);
 }
 #endif
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/817#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list