aboutsummaryrefslogtreecommitdiffstats
path: root/enumerator.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge from ruby_1_8.knu2008-05-241-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge from ruby_1_8.knu2008-05-241-11/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge -r16241:16456 from ruby_1_8.knu2008-05-181-22/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge from ruby_1_8.knu2008-04-221-9/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge from ruby_1_8.knu2008-04-211-5/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: Resolve the method every time an enumerationknu2008-04-201-9/+14
| | | | | | | | | method is run, not once when the enumerator is initialized as it was before, so that method_missing() and method (re)definition afterwards are both in effect; pointed out in: [ruby-core:16441] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (rb_block_call_func): Fix prototype.knu2008-04-141-8/+4
| | | | | | | * enumerator.c (enumerator_iter_i, enumerator_each_i): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (enumerator_mark, enumerator_iter_i, enumerator_each_i,usa2008-04-141-1/+7
| | | | | | | | | | enumerator_allocate): add prototype. * enumerator.c (enumerator_each_i): declare unused two arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (rb_eStopIteration), eval.c (rb_f_loop), ruby.h:knu2008-04-101-0/+45
| | | | | | | | | | | | | | Add a new exception class StopIteration, which breaks Kernel#loop iteration when raised; backported from 1.9. * enumerator.c (enumerator_next, enumerator_rewind): Implement #next and #rewind using the "generator" library. * lib/generator.rb: Implement Enumerable::Enumerator#next and #rewind. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c, inits.c (rb_call_inits), ruby.h, intern.h,knu2008-04-091-0/+414
ext/enumerator, common.mk (OBJS, enumerator.$(OBJEXT)): Make the enumerator module built-in, * enumerator.c: New method: Enumerable::Enumerator#with_index. * enum.c (enum_each_with_index): Enumerable#each_with_index now returns an enumerator instead of raising an exception if no block is given. Enumerable#enum_with_index, formerly defined in the enumerator module, is kept as an alias to each_with_index for backward compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e