summaryrefslogtreecommitdiff
path: root/hash.c
AgeCommit message (Collapse)Author
2004-12-06* process.c (proc_setgroups): [ruby-dev:25081]matz
* re.c (rb_reg_eqq): document fix. [ruby-talk:122541] * io.c (io_fread): take VALUE argument. * ext/socket/socket.c (sock_connect): use rb_str_new4(). [ruby-dev:25052] * eval.c (rb_yield_0): [ruby-dev:25051] * io.c (io_write): remove rb_str_locktmp(). [ruby-dev:25050] * io.c (io_fwrite): takes VALUE string as an argument. [ruby-dev:25050] * ext/socket/socket.c (sock_connect): remove rb_str_locktmp(). [ruby-dev:25050] * ext/socket/socket.c (udp_connect): [ruby-dev:25045] * ext/socket/socket.c (udp_bind): ditto. * ext/socket/socket.c (udp_send): ditto. * ext/socket/socket.c (bsock_send): ditto. * ext/socket/socket.c (s_recvfrom): ditto. * hash.c (rb_hash_hash): should provide "hash" method where "eql?" is redefined. [ruby-talk:122482] * ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18* hash.c (rb_f_getenv): prohibit for $SAFE=4. [ruby-dev:24908]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16* numeric.c (flo_divmod): protect float values from GC bymatz
assignment to local variables. [ruby-dev:24873] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-20rdocnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_mode_flags): preserve append mode flag.matz
[ruby-dev:24436] * io.c (rb_io_modenum_mode): do not use external output buffer. * string.c (rb_str_justify): differ pointer retrieval to prevent padding string modification. [ruby-dev:24434] * range.c (range_each_func): allow func to terminate loop by returning RANGE_EACH_BREAK. * range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-29* array.c (rb_ary_delete): comparison may change the capacity.matz
[ruby-dev:24348] * array.c (rb_ary_fill): fill should honor length argument. [ruby-dev:24346] * array.c (rb_ary_replace): should not use ptr from shared array. [ruby-dev:24345] * ext/socket/socket.c (s_accept): don't retry for EWOULDBLOCK. [ruby-talk:113807] * array.c (flatten): element size might change during comparison. [ruby-dev:24343] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-24* hash.c: iterator functions for hash_foreach() should return enumnobu
st_retval. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-23* hash.c (rb_hash_rehash): replace st_foreach() by its deepmatz
checking counterpart. [ruby-dev:24310] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-22* hash.c (hash_alloc): was using tbl pointer withoutmatz
initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-22* hash.c (rb_hash_rehash): add iteration check. [ruby-dev:24301]matz
* st.c (st_foreach): add deep check. * hash.c (rb_hash_fetch): returns KeyError instead of IndexError. * hash.c (env_fetch): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-22* parse.y: remove global variables ruby_eval_tree andmatz
ruby_eval_tree_begin. * array.c (rb_ary_collect_bang): element size might change during comparison. [ruby-dev:24300] * array.c (rb_ary_reject_bang): ditto. [ruby-dev:24300] * array.c (rb_ary_eql): ditto. [ruby-dev:24300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-21* enum.c (enum_sort_by): do not use qsort directly. usematz
rb_ary_sort_bang() instead. [ruby-dev:24291] * enum.c (enum_sort_by): pedantic type check added. [ruby-dev:24291] * hash.c (rb_hash_foreach_iter): check iter_lev after each iteration. [ruby-dev:24289] * array.c (rb_ary_and): element size might change during comparison. [ruby-dev:24290] * array.c (rb_ary_or): ditto. [ruby-dev:24292] * array.c (rb_ary_equal): wrong fix. [ruby-dev:24286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-11* array.c: remove #indexes, #indices.matz
* 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
2004-05-07* parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz
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
2004-04-07* file.c (rb_get_path): get path string via "to_path" method ifmatz
path object is not a string. [Ruby2] * gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the exit finalizers. * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29* exception message clean-up by Ian Macdonald <ian@caliban.org>.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-26* eval.c (localjump_destination): lambda should not interferematz
return from the yielded block. * hash.c (delete_if_i): use st_delete_safe() (via rb_hash_delete()) instead of returning ST_DELETE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-23RDoc comments for Fixnum, Float, and Hash. Add heuristic to RDoc to handle ↵dave
yaml/stringio git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22* eval.c (rb_with_disable_interrupt): use ENABLE_INTS instead ofmatz
ALLOW_INTS which may switch context. [ruby-dev:22319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-20dln.c: remove last second typo.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19* misc/ruby-mode.el (ruby-calculate-indent): proper indentationmatz
inside of parentheses. [ruby-dev:22308] * hash.c (delete_if_i): do not use ST_DELETE for thread safety. [ruby-dev:21899] (not fully solved) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-28* hash.c (env_has_value, env_index): must match exactly.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25* defines.h (ENV_IGNORECASE): should define when DOSISH withoutusa
human68k. * hash.c (env_has_value, env_index): don't ignore case of value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-15* hash.c: remove unnecessary update.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-14* eval.c (rb_method_node): new API to retrieve method body.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-06* eval.c (rb_load): allow interrupt during loaded programmatz
evaluation. [ruby-dev:21834] * hash.c (rb_hash_fetch): always warn if default argument and a block are supplied at the same time. [ruby-dev:21842] * hash.c (env_fetch): ditto. * array.c (rb_ary_fetch): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-04* class.c, hash.c, string.c: remove #include "version.h".eban
* Makefile.in: remove needless version.h dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-04* io.c (read_all): fptr->f may be NULL, if IO is closed in thematz
signal handler. * io.c (io_read): ditto. * string.c (get_pat): remove 1.8.0 warning code. * string.c (rb_str_match): extend warning until 1.8.2. * string.c (rb_str_match2): ditto. * class.c (class_instance_method_list): remove 1.8.0 warnings. method_list now recurs. [ruby-dev:21816] * class.c (rb_obj_singleton_methods): ditto. * array.c (rb_ary_select): remove select with block. [ruby-dev:21824] * hash.c (rb_hash_select): ditto. * hash.c (env_select): ditto. * re.c (match_select): ditto. * struct.c (rb_struct_select): ditto. * process.c (check_uid_switch): remove duplicated error messages. * process.c (check_gid_switch): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-24* hash.c (rb_hash_each): Hash#each should yield single value.matz
[ruby-talk:84420] * hash.c (env_each): ditto for ENV.each. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01* class.c (rb_obj_singleton_methods): should not go up tomatz
ancestors unless the recursive flag is set. [ruby-list:38007] * hash.c (env_each_key): use env_keys to avoid environment modify on the fly. * hash.c (env_each_value): use env_values for safety. * hash.c (env_each): allocate environment array first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01* eval.c (BEGIN_CALLARGS): should not always reset ruby_iter,matz
need to restore previous value. [ruby-talk:77577] * array.c (rb_ary_fill): array length may be changed during the block execution. [ruby-talk:77579] * array.c (rb_ary_zip): ditto. * array.c (rb_ary_fill): ditto. * hash.c (env_reject_bang): length may be changed during the block execution. * hash.c (env_clear): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25* ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz
uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gcc -Wall clean-up.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-15* lib/matrix.rb: remove elements conversion to_f, to_i, to_r.matz
* lib/cgi/session/pstore.rb: add new file. * process.c (proc_getgroups, proc_setmaxgroups): fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-23* dir.c (find_dirsep): get rid of warnings.nobu
* eval.c (error_print): temporary value might be disposed by GC. * hash.c (env_has_value, env_index): should not increment NULL. * io.c (io_read, rb_io_sysread): not read when length is 0. * io.c (rb_io_reopen): ensure initialized IO. * io.c (rb_io_init_copy): sychronize file pointer. * io.c (rb_io_s_pipe): make exception proof. * string.c (rb_str_rindex_m): Fixnum 0 matched end of string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-23* string.c (rb_str_upto): generate sequence according to "succ"matz
order. formerly check was done by dictionary order. [ruby-talk:74138] * string.c (rb_string_value): fill constant empty string along with setting ELTS_SHARED if str->ptr is NULL. [ruby-core:01179] * string.c (rb_string_value_ptr): ditto. * string.c (rb_check_string_type): ditto. * string.c (str_gsub): move END(0) check before mbclen2(). * string.c (scan_once): reduce END(0) check. * io.c (rb_io_initialize): accept fixnum mode. * eval.c (error_print): replace strchr() by memchr(), einfo may contain "\0". * pack.c (pack_unpack): range check for "@" move; initialize check for "m". * error.c (syserr_initialize): avoid buffer overflow. * file.c (rb_file_s_readlink): expand buffer until readlink succeed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-20* defines.h (PATH_ENV): name of PATH environment. [new].usa
* defines.h (ENV_IGNORECASE): define for case insensitive platforms to access environment variables. * dln.c (dln_find_exe): use PATH_ENV instead of "PATH". * hash.c (env_delete, rb_f_getenv, env_fetch, rb_env_path_tainted, env_aset): ditto. * ruby.c (proc_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-19* hash.c (env_delete, rb_f_getenv, env_fetch): case insensitive tousa
access environment variables on DOSISH platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16* eval.c (proc_alloc): re-unification of Block and Proc. Blockmatz
class is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06* gc.c (define_final): eliminate rb_f_lambda() call.matz
* class.c (rb_scan_args): ditto. * signal.c (sig_trap): ditto. * hash.c (rb_hash_initialize): ditto. * variable.c (rb_f_trace_var): ditto. * ext/dl/dl.c (rb_dl_callback): ditto. * ext/win32ole/win32ole.c (ev_on_event): ditto. * eval.c (ruby_cleanup): $SAFE is turned off in the finalization. Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06* eval.c (ruby_cleanup): $SAFE is turned off in the finalization.matz
Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-26* eval.c (Init_Proc): Block/Proc separation. [huge change]matz
* eval.c (block_arity): returns exact arity number for Procs out of methods. also gives 1 for {|a|..}. * string.c (rb_str_match): revert use of String#index for invocation like string =~ string. * eval.c (rb_Array): move Object#to_a exclusion hack from splat_value(). need to be in eval.c for a while. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-20* eval.c (rb_yield_0): give warning for multiple values for amatz
block parameter. * eval.c (rb_yield_values): a function to yield multiple values. * array.c (sort_1): use rb_yield_values. * enum.c (min_ii, max_ii): ditto. * hash.c (rb_hash_update_block_i, delete_if_i, select_i, each_pair_i, env_each, env_reject_bang, env_select, env_update_i): ditto. * struct.c (rb_struct_each_pair): ditto. * eval.c (top_include): should include module in the current self, not ruby_top_self. [ruby-dev:20198] * eval.c (top_include): stop inclusion to ruby_wrapper; give warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-19* class.c: add #include "version.h".aamine
* hash.c: ditto. * string.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-19* object.c (init_copy): rename copy_object as initialize_copy,matz
since it works as copy constructor. * eval.c (rb_add_method): initialize_copy should always be private, like initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-06* object.c (rb_obj_methods): list singleton methods if recurmatz
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-04* array.c (rb_ary_values_at): new method to replace select(index..).matz
* hash.c (rb_hash_values_at,env_values_at): ditto. * re.c (match_values_at): ditto. * struct.c (rb_struct_values_at): ditto. * re.c (match_select): add iterator behavior. * ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c, ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up "_FILE_OFFSET_BITS redefined" warning on Solaris. * class.c (rb_class_protected_instance_methods): now gives warnings to show migration path. The default will be reversed on Jan 2004. * numeric.c (num_step): "1.1.step(1.5,0.1)" to work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-03* eval.c (rb_f_missing): use "inspect" for T_OBJECT as well.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-31* hash.c (env_reject_bang): untaint key string.matz
* hash.c (env_delete_m): execute block only if deleting key does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-04* io.c (rb_io_popen): do not call rb_io_close() directly, callmatz
"close" method instead. [ruby-dev:19717] * io.c (rb_io_s_open): ditto. * hash.c (rb_any_hash): remove DEFER_INTS. all do_hash() calls in st.c are at the top of functions. No reentrant problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e