diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-19 16:36:00 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-19 16:36:00 +0000 |
commit | 3b4949ffa8602bf5b8fb4be880b9c73c9375d8fa (patch) | |
tree | ace672ab48d817ca1927ee8660859cdb2308da2c /NEWS | |
parent | b307bd9847b548f0f80621b2c4097a7be28de411 (diff) | |
download | ruby-3b4949ffa8602bf5b8fb4be880b9c73c9375d8fa.tar.gz |
* enumerator.c: implement Enumerator#{next_values,peek_values,feed}
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
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -8,7 +8,6 @@ reference information is supplied with. For a full list of changes with all sufficient information, see the ChangeLog file. == Changes since the 1.9.1 release - === Library updates (outstanding ones only) * builtin classes @@ -22,6 +21,13 @@ with all sufficient information, see the ChangeLog file. * Dir.home * Enumerator + * new methods: + * Enumerator#peek + * Enumerator#next_values + * Enumerator#peek_values + * Enumerator#feed + * StopIteration#result + * extended methods: * #with_index accepts an optional argument that specifies the index number to start with, defaulted to 0. @@ -29,6 +35,7 @@ with all sufficient information, see the ChangeLog file. * incompatible changes: * #rewind now calls the "rewind" method of the enclosed object if defined. + * #next doesn't clear the position at end. * IO * new method: |