summaryrefslogtreecommitdiff
path: root/hash.c
AgeCommit message (Collapse)Author
2010-01-26* configure.in: test unsetenv returns a value.akr
unsetenv is void in older BSDs (FreeBSD 6 and OpenBSD 4.5 at least). * hash.c (ruby_setenv): don't use the result of unsetenv if unsetenv doesn't return a value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* hash.c: need to include errno.h for EINVAL.usa
* hash.c (ruby_setenv): fixed typo. see [ruby-dev:40026] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11* hash.c (ruby_setenv): Improve the emulatation of setenv(3) onknu
environments where putenv(3) is used. Raise EINVAL If a variable name contains an '='. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11* hash.c (ruby_setenv): ENV.[]= should raise an error if setenv(3)knu
or putenv(3) fails. [ruby-dev:40023] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-26* removed spaces just before tabs.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-14* hash.c (ruby_setenv): get rid of crash in Solaris 8 and 10.nobu
[ruby-core:26668] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-11* hash.c (ruby_setenv): use ruby_strdup().nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-11* hash.c (ruby_setenv): also set CRT workarea. ref [ruby-core:25010]usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-08* hash.c: use RHASH_IFNONE but not ifnone directly.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-26* hash.c (default_proc_arity_check): new support function.matz
* hash.c (rb_hash_initialize): should do arity check as #default_proc=. [ruby-core:26281] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-24* hash.c (rb_hash_set_default_proc): checks arity of defalt_procmatz
of a Hash. [ruby-core:26087] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28* hash.c (rb_f_getenv): use rb_filesystem_str_new_cstrnaruse
instead of rb_str_new2. ENV['PATH'].encoding should be Filesystem Encoding because its content is related to filesystem. see [ruby-dev:39393] * hash.c (env_fetch): ditto. * string.c (rb_filesystem_str_new): defined. * string.c (rb_filesystem_str_new_cstr): ditto. * include/ruby/intern.h (rb_filesystem_str_new): added. * include/ruby/intern.h (rb_filesystem_str_new_cstr): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28* hash.c (rb_f_getenv, env_fetch): env string may be overwritten.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-24* hash.c (Hash#each): Fix documentation to reflect insertion order. A patch ↵marcandre
by Run Paint Run Run [ruby-core:23644] and [ruby-core:21231] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-24* hash.c (doc): doc fix, patch by Run Paint Run Run [ruby-core:23644]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-15* thread.c (rb_exec_recursive_outer, rb_exec_recursive): Added method to ↵marcandre
short-circuit to the outermost level in case of recursion * test/ruby/test_thread.rb (test_recursive_outer): Test for above * hash.c (rb_hash_hash): Return a sensible hash for in case of recursion [ruby-core:24648] * range.c (rb_range_hash): ditto * struct.c (rb_struct_hash): ditto * array.c (rb_array_hash): ditto * test/ruby/test_array.rb (test_hash2): test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08* include/ruby/st.h (st_hash_func): use st_index_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-03* hash.c (rb_hash_replace): should copy compare_by_identity status as well.matz
[ruby-core:24728] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22* hash.c (Hash::[]): rdoc. patch by Marc-Andre Lafortune.yugui
#1385. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18* suppressed shorten-64-to-32 warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16* hash.c (rb_hash_aset, recursive_hash): rejects recursive hash.nobu
[ruby-core:22921] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12ENV is now locale encoding.naruse
* hash.c (env_str_new): use rb_locale_str_new instead of rb_tainted_str_new. rb_locale_str_new set string locale encoding and tainted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01* hash.c (rb_hash_hash): documentation fix. a patch frommatz
Marc-Andre Lafortune. [ruby-core:23943] * object.c (rb_mod_cmp): ditto. * range.c (range_eq): ditto. * string.c (rb_str_partition, rb_str_rpartition): ditto. * struct.c (rb_struct_s_def): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-08* hash.c (rb_hash_reject_bang): always check frozen status.matz
[ruby-core:23715] * hash.c (rb_hash_update): ditto. * hash.c (rb_hash_reject_bang): call rb_hash_foreach() directly. * hash.c (rb_hash_update_i): call st_insert() directly. * hash.c (rb_hash_update_block_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-29* hash.c (Init_Hash): made #to_s an alias to #inspect to reducenobu
the result of recursive array. a patch from ujihisa at [ruby-core:23601]. [ruby-dev:38555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-29* hash.c (rb_hash_inspect): rescurses with defined ID to get ridnobu
of extra call. [ruby-core:23601] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-27* st.c (st_insert2): new function with processing new key,matz
e.g. copy. * hash.c (rb_hash_aset): use st_insert2() to reduce redundant st_lookup calls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-24* thread.c (rb_exec_recursive_paired): new function for propernobu
handling of recursive arrays. [EXPERIMENTAL] [ruby-core:23402] * array.c (rb_ary_equal, rb_ary_eql, rb_ary_cmp): use above. * hash.c (hash_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-09* hash.c: 3rd arguemnt of rb_hash_foreach() is VALUE.nobu
* hash.c (rb_any_hash, recursive_hash): use VALUE for hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26* hash.c (hash_foreach_iter): fix for prototype.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-15* hash.c (hash_i): use Murmurhash.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),mame
include/ruby/intern.h: add Murmurhash API. [ruby-dev:37784] * complex.c (nucomp_hash), array.c (rb_ary_hash), time.c (time_hash), string.c (rb_str_hsah), object.c (rb_obj_hash), range.c (range_hash), struct.c (rb_struct_hash), hash.c (rb_any_hash), rational.c (nurat_hash): use Murmurhash. [ruby-dev:37784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* hash.c (rb_hash): always return a fixnum value because a returnmame
value of rb_hash may be used as a hash value itself and bignums have no unique VALUE. * test/ruby/test_hash.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-26* hash.c (rb_any_hash): fixed performance issues with nil, true,matz
false as hash keys. a patch from Matthias Waechter. [ruby-core:21568] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-11* hash.c (rb_hash_s_create): set nil as the value if assoc lengthnobu
is not enough. [ruby-core:21249] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19* io.c (rb_io_extract_encoding_option): "internal_encoding: nil"matz
to specify no-transcoding. and other corner case fixed. [ruby-dev:37496] * hash.c (rb_hash_lookup2): new function to look-up hash with default value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18* hash.c (rb_hash_aset): string key copying only happen if key ismatz
an exact instance of String, not a subclass. based on a patch from Mike Gold <mike.gold.4433 at gmail.com> in [ruby-talk:322667]. [incompatible] [ruby-talk:322417] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* ext/stringio/stringio.c (strio_write): should convert writingmatz
string to the encoding of the buffer. * hash.c (rb_any_hash): typo fixed. * ext/zlib/zlib.c (rb_gzwriter_write): oops, IO string conversion need to be done by to_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* io.c (open_key_args): should adjust argc, argv in structmatz
foreach_arg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports MacOS 9 or before.yugui
* eval.c: ditto. * eval_intern.h: ditto. * ext/extmk.rb: ditto. * ext/tk/sample/tkextlib/treectrl/demo.rb: ditto. * ext/tk/stubs.c: ditto. * file.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * ruby.c: ditto. * signal.c: ditto. * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports MS-DOS.yugui
* ext/sdbm/_sdbm.c: ditto. * ext/sdbm/sdbm.h: ditto. * gc.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/util.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * strftime.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30* sprintf.c (rb_str_format): add %<name>s style named argumentmatz
support. a patch from Yusuke Endoh <mame at tsg.ne.jp> in [ruby-dev:35851]. * sprintf.c (rb_str_format): add gettext style named format (%{name}) support. inspired by [ruby-dev:35852]. * sprintf.c (GETNAMEARG): should raise KeyError exception when no named argument found. * hash.c (rb_hash_fetch): export fetch function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* hash.c (rb_obj_is_proc): declaration moved for rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* hash.c (ENVMATCH, ENVNMATCH): reduced same code.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* common.mk, hash.c: remove unused inclusion.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-22* hash.c (env_aset): allow nil value to remove an entry.matz
[ruby-dev:36465] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 * complex.c (nucomp_eql_p): new.tadf
* complex.c (nucomp_hash): should use hash values of the elements. * rational.c (nurat_hash): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03* include/ruby/signal.h: removed.ko1
* common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c, io.c, process.c, signal.c: vm_core.h: ditto. Some unused external global variables are also removed. (rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending, rb_thread_critical) * ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c, ext/readline/readline.c, ext/socket/depend, ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16* include/ruby/ruby.h (rb_intern_const): tiny optimization.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* hash.c (set_default): fix rdoc. #441matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e