diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-21 08:48:33 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-21 08:48:33 +0000 |
commit | 7e9d9833684c0ca428970b14e050664fe7380078 (patch) | |
tree | 847b4cfc16cc66aac40816b9e9769ffb64f95794 /ext/gdbm | |
parent | 5fb3e55ffcf9bc6dd858f6b2cbc7327e3bbe7d65 (diff) | |
download | ruby-7e9d9833684c0ca428970b14e050664fe7380078.tar.gz ruby-7e9d9833684c0ca428970b14e050664fe7380078.tar.xz ruby-7e9d9833684c0ca428970b14e050664fe7380078.zip |
* ext/dbm/dbm.c (fdbm_each_value, fdbm_each_key, fdbm_each_pair):
GDBM#{each,each_pair,each_key,each_value}: Return an enumerator
if no block is given.
* ext/gdbm/gdbm.c (fgdbm_each_value, fgdbm_each_key,
fgdbm_each_pair): GDBM#{each,each_pair,each_key,each_value}:
Return an enumerator if no block is given.
* ext/openssl/ossl_config.c (ossl_config_each):
OpenSSL::Config#each: Return an enumerator if no block is given.
* ext/readline/readline.c (hist_each): Readline::HISTORY#each:
Return an enumerator if no block is given.
* ext/sdbm/init.c (fsdbm_each_value, fsdbm_each_key,
fsdbm_each_pair): SDBM#{each,each_pair,each_key,each_value}:
Return an enumerator if no block is given.
* ext/stringio/stringio.c (strio_each_byte, strio_each):
StringIO#{each,each_line,each_byte}: Return an enumerator if no
block is given.
* ext/stringio/stringio.c (Init_stringio): Add #lines and #bytes,
which are aliases to #each_line and #each_byte, respectively.
* ext/win32ole/win32ole.c (fole_each): WIN32OLE#each: Return an
enumerator if no block is given.
* ext/zlib/zlib.c (rb_gzreader_each_byte, rb_gzreader_each):
Zlib::GzipReader#{each,each_line,each_byte}: Return an
enumerator if no block is given.
* ext/zlib/zlib.c (Init_zlib): Add Zlib::GzipReader#lines and
#bytes, which are aliases to #each_line and #each_byte,
respectively.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/gdbm')
-rw-r--r-- | ext/gdbm/gdbm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c index 8a1acbc96..04fdf886b 100644 --- a/ext/gdbm/gdbm.c +++ b/ext/gdbm/gdbm.c @@ -801,6 +801,8 @@ fgdbm_each_value(VALUE obj) GDBM_FILE dbm; VALUE keystr; + RETURN_ENUMERATOR(obj, 0, 0); + GetDBM2(obj, dbmp, dbm); for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); keystr = rb_gdbm_nextkey(dbm, keystr)) { @@ -825,6 +827,8 @@ fgdbm_each_key(VALUE obj) GDBM_FILE dbm; VALUE keystr; + RETURN_ENUMERATOR(obj, 0, 0); + GetDBM2(obj, dbmp, dbm); for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); keystr = rb_gdbm_nextkey(dbm, keystr)) { @@ -849,6 +853,8 @@ fgdbm_each_pair(VALUE obj) struct dbmdata *dbmp; VALUE keystr; + RETURN_ENUMERATOR(obj, 0, 0); + GetDBM2(obj, dbmp, dbm); for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr); keystr = rb_gdbm_nextkey(dbm, keystr)) { |