Skip to content
  • Tanaka Akira's avatar
    3b4949ff
    * enumerator.c: implement Enumerator#{next_values,peek_values,feed} · 3b4949ff
    Tanaka Akira authored
      and StopIteration#result.  [ruby-dev:39109]
      (struct enumerator): replace no_next by stop_exc.
      new field feedvalue.
      (enumerator_mark): mark feedvalue and stop_exc.
      (enumerator_init): initialize feedvalue and stop_exc.
      (enumerator_init_copy): initialize feedvalue.
      (next_ii): send yield arguments as an array.  return feedvalue.
      (next_i): generate StopIteration exception here.  set result.
      (next_init): initialize feedvalue.
      (enumerator_next_values): new method Enumerator#next_values.
      (ary2sv): new function.
      (enumerator_peek_values): new method Enumerator#peek_values.
      (enumerator_feed): new method Enumerator#feed.
      (yielder_yield): return the yield value.
      (generator_each): return the iterator value.
      (stop_result): new method StopIteration#result.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    3b4949ff
    * enumerator.c: implement Enumerator#{next_values,peek_values,feed}
    Tanaka Akira authored
      and StopIteration#result.  [ruby-dev:39109]
      (struct enumerator): replace no_next by stop_exc.
      new field feedvalue.
      (enumerator_mark): mark feedvalue and stop_exc.
      (enumerator_init): initialize feedvalue and stop_exc.
      (enumerator_init_copy): initialize feedvalue.
      (next_ii): send yield arguments as an array.  return feedvalue.
      (next_i): generate StopIteration exception here.  set result.
      (next_init): initialize feedvalue.
      (enumerator_next_values): new method Enumerator#next_values.
      (ary2sv): new function.
      (enumerator_peek_values): new method Enumerator#peek_values.
      (enumerator_feed): new method Enumerator#feed.
      (yielder_yield): return the yield value.
      (generator_each): return the iterator value.
      (stop_result): new method StopIteration#result.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
To find the state of this project's repository at the time of any of these versions, check out the tags.
Loading