gdbm_reorganize(). gdbm_reorganize() opens a new database internally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(RARRAY_LEN): defined for accessing array members.
(RARRAY_PTR): ditto.
* array.c: use RARRAY_LEN and RARRAY_PTR.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(RSTRING_LEN): defined for accessing string members.
(RSTRING_PTR): ditto.
* string.c: use RSTRING_LEN and RSTRING_PTR.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
message. a patch from Mauricio Fernandez <mfp at acm.org>
[ruby-core:07340]
* eval.c (rb_f_autoload): check if ruby_cbase is nil (during
instance_eval for objects cannot have singleton classes,
e.g. fixnums and symbols). [ruby-dev:28178]
* gc.c (rb_gc_call_finalizer_at_exit): turn on during_gc while
invoking finalizers.
* gc.c (rb_gc_finalize_deferred): ditto.
* io.c (rb_write_error2): use fwrite(3) if rb_stderr is not
updated or is already freed. [ruby-dev:28313]
* eval.c (error_line): include the class name of a surrounding
method in error position description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(for constant reference).
* eval.c (rb_call0): use TMP_ALLOC() instead of allocating
a temporary array object.
* eval.c (eval): need not to protect $SAFE value.
[ruby-core:07177]
* error.c (Init_Exception): change NameError to direct subclass of
Exception so that default rescue do not handle it silently.
* struct.c (rb_struct_select): update RDoc description.
[ruby-core:7254]
* numeric.c (int_upto): return an enumerator if no block is
attached to the method.
* numeric.c (int_downto): ditto.
* numeric.c (int_dotimes): ditto.
* enum.c (enum_first): new method Enumerable#first to take first n
element from an enumerable.
* enum.c (enum_group_by): new method Enumerable#group_by that
groups enumerable values according to their block values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/gdbm/gdbm.c (fgdbm_closed): new method GDBM#closed?
* ext/sdbm/init.c (fsdbm_closed): new method SDBM#closed?
* test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, test/sdbm/test_sdbm.rb
(teardown): close all db objects before deleting data files.
* win32/win32.{ch} (unlink): hook runtime function to change
file attribute before unlinking.
merge from 1.8, see [ruby-dev:26360]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: ditto.
* ext/dbm/dbm.c: remove #indexes, #indices, "values_at" warning
from #select.
* ext/gdbm/gdbm.c: ditto.
* ext/sdbm/init.c: ditto.
* ext/dbm/dbm.c (Init_dbm): set VERSION constant as "unknown" when
DB_VERSION_STRING is not available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
unnecessary line trace for inlined expression.
(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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nmake quotes args if included `=' in args.
* instruby.rb: use getopts.rb.
* ext/dbm/extconf.rb: substitute ' with ".
* ext/gdbm/gdbm.c: add prototypes to avoid VC++ warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/gdbm/gdbm.c (fgdbm_select): ditto.
* ext/sdbm/sdbm.c (fsdbm_select): ditto.
* ext/dbm/dbm.c (fdbm_delete): adopt Hash#delete behavior.
* ext/sdbm/sdbm.c (fsdbm_delete): ditto.
* ext/gdbm/gdbm.c: need not to dup key to the block.
* ext/sdbm/sdbm.c : replace RuntimeError with SDBMError.
* eval.c (rb_f_missing): NoMethod error messages for true, false,
nil must respond visibility like for other objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
div, mod.
* time.c (time_cmp): should handle Bignums.
* array.c (rb_ary_pop): should ELTS_SHARED flag check before
REALLOC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e