summaryrefslogtreecommitdiff
path: root/array.c
AgeCommit message (Collapse)Author
2004-11-18* process.c (proc_getpgrp): prohibit for $SAFE=2.matz
[ruby-dev:24899] * process.c (get_pid): ditto. [ruby-dev:24904] * process.c (get_ppid): ditto. * array.c (rb_ary_delete): defer rb_ary_modify() until actual modification. [ruby-dev:24901] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-15* array.c (rb_ary_update): pedantic check to detectmatz
rb_ary_to_ary() to modify the receiver. [ruby-dev:24861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-11* dir.c (rb_glob): should have called rb_glob_caller().matz
[ruby-dev:24773] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-03* array.c (rb_ary_uniq_bang): do not push frozen string from hashmatz
table. [ruby-dev:24695] * array.c (rb_ary_and): ditto. * array.c (rb_ary_or): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-31* io.c (rb_f_open): create copy of popen specifier. [ruby-dev:24656]matz
* string.c (rb_str_locktmp): lock string temporarily. * string.c (str_independent): add tmplock check. * io.c (io_write): lock output string temporarily. [ruby-dev:24649] * io.c (io_write): use rb_str_locktmp(). * io.c (read_all): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30* eval.c (rb_eval): NODE_XSTR should pass copy of literal string.matz
* array.c (rb_ary_update): a[n,m]=nil no longer works as element deletion. * enum.c (enum_sort_by): protect continuation jump in. [ruby-dev:24642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27* node.h (NODE_TYPESHIFT): allow 4 more bits for line numbers.matz
[ruby-talk:117841] * ruby.h (FL_ABLE): nodes are not subject for flag operations. * io.c (ARGF_FORWARD): should have specified argv explicitly, since we no longer have frame->argv saved. [ruby-dev:24602] * string.c (RESIZE_CAPA): check string attribute before modifying capacity member of string structure. [ruby-dev:24594] * ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain performance. [ruby-talk:117701] * sprintf.c (rb_f_sprintf): raise ArgumentError for extra arguments, unless (digit)$ style used. * io.c (rb_io_fptr_finalize): leave stdin/stdout/stderr open in interpreter termination. [ruby-dev:24579] * eval.c (frame_free): Guy Decoux solved the leak problem. Thanks. [ruby-core:03549] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* array.c (rb_ary_times): Array#* should return an instance ofmatz
the class of right operand. [ruby-dev:24526] * ext/zlib/zlib.c (zstream_detach_buffer): should not expose class-less object to Ruby world. [ruby-dev:24530] * eval.c (proc_dup): provide Proc#dup as well. [ruby-talk:116915] * eval.c (ruby_exec): stack marking position may be higher than expected. thanks to Guy Decoux. [ruby-core:03527] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-07fix typo in document.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-05* io.c (rb_fopen): mode string copy at the lowest level.matz
* io.c (rb_io_flags_mode): requires output buffer no more. no allocation needed. * array.c (rb_ary_index): takes a block to compare items in an array. [ruby-talk:113069] [Ruby2] * array.c (rb_ary_rindex): ditto. * marshal.c (r_byte): retrieve pointer from string value for each time. [ruby-dev:24404] * marshal.c (r_bytes0): ditto. * enum.c (sort_by_i): re-entrance check added. [ruby-dev:24399] * io.c (io_read): should freeze all reading buffer. [ruby-dev:24400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6996 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* parse.y (rb_parser_append_print): should handle prelude.matz
[llama@u01.gate0] * parse.y (rb_parser_while_loop): ditto. * array.c (rb_ary_subseq): original object might be modified after sharing data creation. [ruby-dev:24327] * array.c (rb_ary_replace): ditto. * array.c (ary_make_shared): freeze shared array. [ruby-dev:24325] * struct.c (struct_members): always check struct size and size of members list in the class. [ruby-dev:24320] * string.c (rb_str_sub_bang): check if string is not modified during iteration. [ruby-dev:24315] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6957 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* 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-09-17* array.c (rb_ary_delete): element comparison might change arraymatz
size. [ruby-dev:24273] * parse.y: make ruby parser reentrant. merge ripper parser to the real one. this change makes ruby require bison. * file.c (rb_file_truncate): clear stdio buffer before truncating the file. [ruby-dev:24191] * ext/digest/digest.c: use rb_obj_class() instead of CLASS_OF which might return singleton class. [ruby-dev:24202] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-24* range.c (rb_range_beg_len): returns Qnil only when "beg" pointsmatz
outside of a range. No boundary check for "end". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-13* array.c: rdoc patch - unified margin.ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-13* array.c: rdoc patch. merged patch from Johan Holmbergocean
<holmberg@iar.se> [ruby-core:3170] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-09* array.c, enum.c, pack.c: rdoc patch from Johan Holmbergocean
<holmberg@iar.se> [ruby-core:3132] [ruby-core:3136] * numeric.c: rdoc patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-16* array.c (rb_ary_pop): rdoc update for new usage. [ruby-core:03022]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-16* array.c (ary_new): move alloc behind checks. [ruby-core:02982]nobu
* array.c (rb_ary_pop_m, rb_ary_shift_m): take arg to behave as push and unshift. * array.c (rb_ary_first, rb_ary_last): make shared array for result array, and correct doc for Array#first(n) and Array#last(n) * array.c (rb_ary_select): not accept any arg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6464 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-14* range.c (range_each_func): terminates loop if generating valuematz
is same to @end. [ruby-talk:100269] * string.c (rb_str_new4): should not reuse frozen shared string if the original is not an instance of String. [ruby-talk:100193] * time.c (time_mdump): preserve GMT bit in the marshal data. [ruby-talk:100213] * eval.c (is_defined): do not protect exception during receiver evaluation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6313 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-14* array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,nobu
process.c, re.c, string.c: typos in RDoc comments. [ruby-core:02783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6158 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-03-20* eval.c (rb_require_safe): preserve old ruby_errinfo.matz
[ruby-talk:95409] * eval.c (rb_f_raise): should not clear backtrace information if exception object already have one. * parse.y (assoc_list): allow {sym: val} style Hash. [Ruby2] this change is done by Nobuyoshi Nakada <nobu@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-18* eval.c: remove specialized version of rb_Array(). use simplematz
one defined in object.c. * object.c (Init_Object): remove Kernel#to_a. * enum.c (enum_zip): use "to_a" instead of "to_ary". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-26Doug Kearns's doc. patchdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-30Add RDoc for kernel functions, and tidy updave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-29Tidy array.c RDocdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-23Fix doc typosdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-16Put RDoc comments into array.c, and refine rdoc/ri to deal with stuff that arosedave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5202 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* 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-09-05* eval.c (mark_frame_adj): need to adjust argv pointer if usingmatz
system's alloca. [ruby-core:01503] * io.c (rb_f_gets): should call next_argv() before type check current_file. [ruby-list:38336] * eval.c (proc_invoke): should retrieve retval when pcall is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-06* eval.c (rb_call0): update ruby_class as well as ruby_cref.matz
(ruby-bugs-ja PR#540) * eval.c (rb_yield_0): remove ruby_frame->cbase and unify to ruby_cref. [ruby-talk:78141] * eval.c: initialize /* OK */ variables by Qnil to stop warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4346 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-31 * array.c (rb_ary_collect): must get length of array for eachusa
iteration. reported on [ruby-talk:77500], and fixed by K.Sasada <ko1@namikilab.tuat.ac.jp> on [ruby-talk:77504] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4240 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-03* array.c (rb_values_at): extract common procedure frommatz
rb_ary_values_at. follow DRY principle. * re.c (match_values_at): values_at should understand ranges. * struct.c (rb_struct_values_at): ditto. * struct.c (inspect_struct): inspect format changed; add "struct " at the top. * sprintf.c (rb_f_sprintf): "%p" specifier for inspect output. (RCR#68) * eval.c (rb_mod_undef_method): allow "undef_method" to accept multiple arguments. (RCR#146) * lib/timeout.rb: put timeout in Timeout module. (RCR#121) [ruby-talk:61028] * re.c (match_groups): new method added. (RCR#139) * variable.c (rb_mod_const_of): should exclude constant defined in Object, unless retrieving constants of Object. * string.c (rb_str_new4): do not allocate new string if original is frozen or already have copy-on-write entry. [ruby-talk:74940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-23* array.c (rb_ary_unshift_m): need to check number of arguments.nobu
[ruby-talk:74189] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3991 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-06-02* array.c (push_values_at): Array#values_at should work withmatz
ranges too. * range.c (rb_range_beg_len): length calculation was wrong. * eval.c (rb_call): should set T_ICLASS in the frame->last_class. [ruby-core:01110] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3899 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* ext/pty/pty.c (pty_finalize_syswait): join (using Thread#value)matz
before detach pid. [ruby-talk:71519] * eval.c (PUSH_FRAME): save outer ruby_block. [ruby-list:37677], [ruby-dev:20202] * eval.c (BEGIN_CALLARGS): restore outer block by using ruby_block->outer. * eval.c (block_pass): do not alter block->prev, but block->outer. * array.c (get_inspect_tbl): warning on wrong condition. * eval.c (localjump_xvalue): renamed exitstatus to exit_value since it's not exit "status" after all. * eval.c (localjump_error): add reason to LocalJumpError. * compar.c (rb_cmpint): raise error via rb_cmperr(), if cmp value is nil. now take new 2 arguments. * time.c (time_cmp): 2003-05-16 fix was incomplete. (ruby-bugs-ja:PR#458) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e