1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

11 commits

Author SHA1 Message Date
knu
76991f51ec Improve rdoc for Enumerator#next. Remove a not-so-notable note.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02 11:02:35 +00:00
knu
8a919dcb19 * lib/generator.rb (Enumerator#__generator): Remove next() before
overriding it to avoid a awarning.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26 03:37:28 +00:00
knu
5d8659a195 * enumerator.c (enumerator_next, enumerator_rewind),
lib/generator.rb (Enumerator#rewind): If the enclosed object
  responds to a "rewind" method, call it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-11 12:14:10 +00:00
knu
1c9afaea7f * lib/generator.rb (Enumerator#__generator): Now that
Enumerator::Generator is defined, the Generator here must be
  referred to as ::Generator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-11 11:37:38 +00:00
knu
e9a07af797 * enumerator.c (enumerator_next): Fix a typo: s/rewinded/rewound/.
* lib/generator.rb (Enumerator#next): Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-10 03:51:49 +00:00
knu
3c118f0f04 * enumerator.c (enumerator_ptr), lib/generator.rb:
Enumerable::Enumerator is renamed to Enumerator.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21 08:33:05 +00:00
knu
badb865567 * enumerator.c (rb_eStopIteration), eval.c (rb_f_loop), ruby.h:
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
2008-04-10 10:52:50 +00:00
matz
2b5a14bf7c * eval.c (rb_eval): too many line trace call. (ruby-bugs PR#1320)
* numeric.c (flo_to_s): tweak output string based to preserve
  decimal point and to remove trailing zeros.  [ruby-talk:97891]

* string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM
  search.  [ruby-talk:97342]

* hash.c (rb_hash_equal): returns true if two hashes have same set
  of key-value set.  [ruby-talk:97559]

* hash.c (rb_hash_eql): returns true if two hashes are equal and
  have same default values.

* string.c (rb_str_equal): always returns true or false, never
  returns nil. [ruby-dev:23404]

* io.c (rb_io_reopen): should use rb_io_check_io().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 08:48:30 +00:00
gsinclair
d443db7fd9 * lib/generator.rb: corrected doc format
* lib/rinda/rinda.rb: added documentation (from Hugh Sasse)
 * lib/rinda/tuplespace.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-16 13:09:39 +00:00
knu
a7ddb2e342 * lib/generator.rb: Add rdoc documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-17 14:01:26 +00:00
knu
3982f82b03 * lib/generator.rb: A new library which converts an internal
iterator to an external iterator.

* lib/abbrev.rb: A new library which creates an abbreviation table
  from a list.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-14 20:14:20 +00:00