summaryrefslogtreecommitdiffstats
path: root/ext/dbm
Commit message (Collapse)AuthorAgeFilesLines
* * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko12008-06-081-1/+1
| | | | | | | | | | | | | | | | | | | enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_each_value, fdbm_each_key, fdbm_each_pair):knu2008-04-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-061-1/+0
| | | | | | | string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_yield): when multiple values yielded from #eachmatz2007-12-251-1/+1
| | | | | | | | | pack them into an array. [ruby-dev:32708] * enum.c: all method but all?, any?, one? and none? passed packed multiple values to the block. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/extconf.rb: allow multiple candidates for dbm-type.nobu2006-09-161-34/+26
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/extconf.rb: create makefile according to the result of checknobu2006-09-041-4/+4
| | | | | | | for dbm header. fixed: [ruby-dev:29445] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi.rb (CGI::out): specify -x option for nkf.matz2006-09-041-1/+0
| | | | | | | | * lib/cgi.rb (CGI::out): should not convert utf-8 implicitly using NKF. it is too Japanese centric. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RArray): embed small arrays.matz2006-09-021-5/+5
| | | | | | | | | | (RARRAY_LEN): defined for accessing array members. (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RString): embed small strings.matz2006-08-312-26/+27
| | | | | | | | | | (RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add extconf.h.akr2006-06-251-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h, lib/mkmf.rb (create_header): clear command line options fornobu2006-05-251-1/+1
| | | | | | | | | | | | | | | macros moved to extconf.h. * ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and EXTSTATIC permanent. * ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS. * {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added $(INCFLAGS). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_parse_string): mention "regexp" in a errormatz2006-02-131-73/+33
| | | | | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@9918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c: unify ruby_class (for method definition) and ruby_cbasematz2006-02-031-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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: http://svn.ruby-lang.org/repos/ruby/trunk@9880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* banish some warnings.akr2005-09-241-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_closed): new method DBM#closed?usa2005-06-201-0/+16
| | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@8650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dbm/test_dbm.rb: merged from ext/dbm/testdbm.rb.akr2005-06-041-593/+0
| | | | | | | * test/gdbm/test_gdbm.rb: merged from ext/gdbm/testgdbm.rb. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_select): [ruby-dev:25132]matz2004-12-091-46/+35
| | | | | | | | | | | | * ext/sdbm/init.c: ditto. * ext/gdbm/gdbm.c: ditto. * eval.c (proc_invoke): merge Guy Decoux's argument preserve patch in [ruby-core:03874]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_clear): avoid revealing NULL pointer.matz2004-11-141-1/+1
| | | | | | | | | | | | | | | | | | [ruby-dev:24766] * string.c (str_gsub): add paranoid check. [ruby-dev:24827] * string.c (str_mod_check): check frozen status as well. [ruby-dev:24801] * lib/mathn.rb (Integer::gcd2): faster implementation by <erlercw@siu.edu>. [ruby-talk:120232] * ext/gdbm/gdbm.c (fgdbm_store): StringValue() may alter string pointer. [ruby-dev:24783] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * MANIFEST, ext/**/MANIFEST: removed.eban2004-11-011-5/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_delete_if): should check if deleting elementmatz2004-10-191-0/+1
| | | | | | | | | is a string. [ruby-dev:24490] * ext/sdbm/init.c (fsdbm_delete_if): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): block string buffer modification duringmatz2004-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_io_fread() by freezing it temporarily. [ruby-dev:24479] * dir.c (rb_push_glob): block call at once the end of method. [ruby-dev:24487] * ext/enumerator/enumerator.c (enum_each_slice): remove rb_gc_force_recycle() to prevent potential SEGV. [ruby-dev:24499] * ext/zlib/zlib.c (zstream_expand_buffer): hide internal string buffer by clearing klass. [ruby-dev:24510] * ext/socket/socket.c (sock_s_getservbyaname): protocol string might be altered. [ruby-dev:24503] * string.c (rb_str_upto): check if return value from succ is a string. [ruby-dev:24504] * io.c (rb_io_popen): get mode string via rb_io_flags_mode() to avoid mode string modification. [ruby-dev:24454] * io.c (rb_io_getline_fast): should take delim as unsigned char to distinguish EOF and '\377'. [ruby-dev:24460] * io.c (rb_io_getline): add check for RS modification. [ruby-dev:24461] * enum.c (enum_sort_by): use qsort() directly instead using rb_iterate(). [ruby-dev:24462] * enum.c (enum_each_with_index): remove rb_gc_force_recycle() to prevent access to recycled object (via continuation for example). [ruby-dev:24463] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: remove #indexes, #indices.matz2004-06-111-48/+16
| | | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@6449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_initialize): accept optional 3rd argument toakr2004-05-161-11/+29
| | | | | | | | | specify an open flag. (Init_dbm): define open flags: DBM::READER, DBM::WRITER, DBM::WRCREAT and DBM::NEWDB. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_open): open should not ignore block when "to_open"matz2004-05-081-3/+1
| | | | | | | | | method is used. [ruby-dev:23478] * ext/dbm/dbm.c (fdbm_modify): typo fixed. [ruby-dev:23473] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz2004-05-071-5/+15
| | | | | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* consistent parentheses in assignment RHS.matz2003-10-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/mkmf.rb (have_type): check if a type is defined.nobu2003-07-241-1/+1
| | | | | | | | | | * lib/mkmf.rb (check_sizeof): check size of a type. * ext/dbm/extconf.rb: check if type DBM is defined. [ruby-talk:76693] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/extconf.rb (gdbm_compat, qdbm): add check for gdbm_compateban2003-07-071-1/+1
| | | | | | | and qdbm. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_obj_methods): list singleton methods if recurmatz2003-05-062-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | argument is false; list all methods otherwise. * numeric.c (num_step): double epsilon to make "1.1.step(1.5,0.1)" to work. * ext/gdbm/gdbm.c (fgdbm_values_at): new method to replace select(index..). * ext/sdbm/init.c (fsdbm_values_at): ditto. * ext/dbm/dbm.c (fdbm_values_at): ditto. * ext/dbm/dbm.c (DBM::VERSION): defined. * ext/gdbm/testgdbm.rb: replace select with values_at. * ext/sdbm/testsdbm.rb: ditto. * ext/dbm/testdbm.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (each_pair): add prototype to avoid VC++ warnings.usa2003-04-171-0/+2
| | | | | | | | * ext/readline/readline.c (Init_readline): follow readline 4.2 prototype. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/extconf.rb: add QDBM support.eban2003-03-071-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* -Wall cleanups (removed unused vars, no 'code has no effect' warnings)michal2003-01-161-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {win32,bcc32}/Makefile.sub: remove `=' from --make-flags options.eban2002-12-271-1/+1
| | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@3229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_alloc): allocator takes only one argument.usa2002-12-211-3/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ditto.nobu2002-12-201-5/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/extconf.rb (rb_check): support for GNU dbm 1.8.3.eban2002-12-131-0/+4
| | | | | | | | (-with-dbm-type=gdbm_compat). link against -lgdbm_compat and -lgdbm. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/extconf.rb (db_check): check existence of the functioneban2002-12-131-1/+1
| | | | | | | in the specified library before checking it in libc. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_indexes, fdbm_select): add a missingknu2002-10-251-2/+2
| | | | | | | | | | argument and prevent coredump when a nonexistent key is specified. * ext/sdbm/init.c (fsdbm_indexes, fsdbm_select): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update.knu2002-09-271-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: modify program_prefix only if specifiedeban2002-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | --program-prefix. * configure.in: don't generate ext/extmk.rb. * Makefile.in: execute directly $(srcdir)/ext/extmk.rb. remove -Cext option, "Dir::chdir 'ext'" in ext/extmk.rb. * {win32,bccwin32}/Makefile.sub: ditto. * instruby.rb: ditto. * ext/extmk.rb: renamed from ext/extmk.rb.in. * lib/mkmf.rb (module Logging): create log files (mkmf.log) in each extension module directories. * ext/extmk.rb: ditto. * lib/mkmf.rb (macro_defined?): new method. * ext/.cvsignore: remove extmk.rb. * ext/*/.cvsignore: add "*.def". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make cvs ignore mkmf.log.knu2002-03-041-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/dbm.c (fdbm_select): 1.7 behavior.matz2002-02-272-21/+83
| | | | | | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@2145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: use GCC, not without_gcc. remove without_gcc.eban2001-12-021-1/+1
| | | | | | | | * ext/curses/extconf.rb: check for curses.h. * ext/dbm/extconf.rb: check if $CFLAGS includes DBM_HDR. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: use waitpid on mingw32.eban2001-06-011-1/+1
| | | | | | | * ext/dbm/extconf.rb: include <ndbm.h>, not <gdbm.h>. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/extconf.rb: fix support for *BSD and set $CFLAGSknu2001-05-241-5/+3
| | | | | | | properly. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): need argument adjustment for C definedmatz2001-05-241-45/+45
| | | | | | | blocks too. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): need argument adjustment for C definedmatz2001-05-241-9/+28
| | | | | | | | | blocks too. * ext/dbm/extconf.rb: header search added. [new] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dbm/extconf.rb: fix for FreeBSD and GDBM.eban2001-05-071-7/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forgot some checkins.matz2001-05-061-0/+570
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (block_pass): should not downgrade safe level.matz2001-05-022-19/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/dbm/extconf.rb: allow specifying dbm-type explicitly. * ext/dbm/extconf.rb: avoid gdbm if possible, because it leaks memory, whereas gdbm.so doesn't. potential incompatibility. * string.c (rb_str_insert): new method. * parse.y (yylex): lex_state after RESCUE_MOD should be EXPR_BEG. * array.c (rb_ary_insert): new method. * array.c (rb_ary_update): new utility function. * io.c (set_outfile): should check if closed before assignment. * eval.c (rb_eval): should preserve value of ruby_errinfo. * eval.c (rb_thread_schedule): infinite sleep should not cause dead lock. * array.c (rb_ary_flatten_bang): proper recursive detection. * eval.c (yield_under): need not to prohibit at safe level 4. * pack.c (pack_pack): p/P packs nil into NULL. * pack.c (pack_unpack): p/P unpacks NULL into nil. * pack.c (pack_pack): size check for P template. * ruby.c (set_arg0): wrong predicate when new $0 value is bigger than original space. * gc.c (id2ref): should use NUM2ULONG() * object.c (rb_mod_const_get): check whether name is a class variable name. * object.c (rb_mod_const_set): ditto. * object.c (rb_mod_const_defined): ditto. * marshal.c (w_float): precision changed to "%.16g" * eval.c (rb_call0): wrong retry behavior. * numeric.c (fix_aref): a bug on long>int architecture. * eval.c (rb_eval_string_wrap): should restore ruby_wrapper. * regex.c (re_compile_pattern): char class at either edge of range should be invalid. * eval.c (handle_rescue): use === to compare exception match. * error.c (syserr_eqq): comparison between SytemCallErrors should based on their error numbers. * eval.c (safe_getter): should use INT2NUM(). * bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long. * regex.c (calculate_must_string): wrong length calculation. * eval.c (rb_thread_start_0): fixed memory leak. * parse.y (none): should clear cmdarg_stack too. * io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on some platforms. * file.c (rb_stat_dev): device functions should honor stat field types (except long long such as dev_t). * eval.c (rb_mod_nesting): should not push nil for nesting array. * eval.c (rb_mod_s_constants): should not search array by rb_mod_const_at() for nil (happens for singleton class). * class.c (rb_singleton_class_attached): should modify iv_tbl by itself, no longer use rb_iv_set() to avoid freeze check error. * variable.c (rb_const_get): error message "uninitialized constant Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo". * eval.c (rb_mod_included): new hook called from rb_mod_include(). * io.c (opt_i_set): should strdup() inplace_edit string. * eval.c (exec_under): need to push cref too. * eval.c (rb_f_missing): raise NameError for "undefined local variable or method". * error.c (Init_Exception): new exception NoMethodError. NameError moved under ScriptError again. * eval.c (rb_f_missing): use NoMethodError instead of NameError. * file.c (Init_File): should redifine "new" class method. * eval.c (PUSH_CREF): sharing cref node was problematic. maintain runtime cref list instead. * eval.c (rb_eval): copy defn node before registering. * eval.c (rb_load): clear ruby_cref before loading. * variable.c (rb_const_get): no recursion to show full class path for modules. * eval.c (rb_set_safe_level): should set safe level in curr_thread as well. * eval.c (safe_setter): ditto. * object.c (rb_obj_is_instance_of): nil belongs to false, not true. * time.c (make_time_t): proper (I hope) daylight saving time handling for both US and Europe. I HATE DST! * eval.c (rb_thread_wait_for): non blocked signal interrupt should stop the interval. * eval.c (proc_eq): class check aded. * eval.c (proc_eq): typo fixed ("return" was ommitted). * error.c (Init_Exception): move NameError under StandardError. * class.c (rb_mod_clone): should copy method bodies too. * bignum.c (bigdivrem): should trim trailing zero bdigits of remainder, even if dd == 0. * file.c (check3rdbyte): safe string check moved here. * time.c (make_time_t): remove HAVE_TM_ZONE code since it sometimes reports wrong time. * time.c (make_time_t): remove unnecessary range check for platforms where negative time_t is available. * process.c (proc_waitall): should push Process::Status instead of Finuxm status. * process.c (waitall_each): should add all entries in pid_tbl. these changes are inspired by Koji Arai. Thanks. * process.c (proc_wait): should not iterate if pid_tbl is 0. * process.c (proc_waitall): ditto. * numeric.c (flodivmod): a bug in no fmod case. * process.c (pst_wifsignaled): should apply WIFSIGNALED for status (int), not st (VALUE). * io.c (Init_IO): value of $/ and $\ are no longer restricted to strings. type checks are done on demand. * class.c (rb_include_module): module inclusion should be check taints. * ruby.h (STR2CSTR): replace to StringType() and StringTypePtr(). * ruby.h (rb_str2cstr): ditto. * eval.c (rb_load): should not copy topleve local variables. It cause variable/method ambiguity. Thanks to L. Peter Deutsch. * class.c (rb_include_module): freeze check at first. * eval.c (rb_attr): sprintf() and rb_intern() moved into conditional body. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e