summaryrefslogtreecommitdiff
path: root/string.c
AgeCommit message (Collapse)Author
2004-12-09* string.c (rb_str_inspect): escape # which starts an expressionnobu
substitution. fixed: [ruby-core:03922] * string.c (rb_str_dump): not escape # which isn't a substitution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29* object.c (convert_type): [ruby-core:03845]matz
* eval.c (rb_funcall_rescue): new function. * object.c (rb_Array): avoid using rb_respond_to(). * object.c (rb_Integer): ditto. * eval.c (get_backtrace): no conversion for nil. * parse.y (reduce_nodes): empty body should return nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25* configure.in: AC_PREREQ(2.53) [ruby-core:03800]matz
* io.c (read_all): [ruby-dev:24955] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-20* string.c (rb_str_splice): should place index wrapping aftermatz
possible modification. [ruby-dev:24940] * eval.c (error_print): nicer traceback at interrupt. [ruby-core:03774] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-19* string.c (str_gsub): internal buffer should not be listed bymatz
ObjectSpace.each_object() by String#gsub. [ruby-dev:24931] * lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise exception if data corresponding to session specified from the client does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18* string.c (str_gsub): internal buffer should not be listed bymatz
ObjectSpace.each_object(). [ruby-dev:24919] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-17* re.c (rb_reg_initialize_m): should raise exception instead ofmatz
compile error. [ruby-core:03755] * string.c (rb_str_splice): move rb_str_modify() after StringValue(), which may alter the receiver. [ruby-dev:24878] * error.c (rb_error_frozen): now raise RuntimeError instead of TypeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16* string.c (str_mod_check): frozen check should be separated.matz
[ruby-core:3742] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7280 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-14* string.c (rb_str_clear): avoid revealing NULL pointer.matz
[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: svn+ssh://ci.ruby-lang.org/ruby/trunk@7265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-10* dir.c (rb_glob2): do not allocate buffer from heap to avoidmatz
memory leaks. use string object for buffering instead. [ruby-dev:24738] * dir.c (join_path): ditto. * io.c (io_read): external input buffer may be modified even after rb_str_locktmp(). [ruby-dev:24735] * dir.c (fnmatch): p or s may be NULL. [ruby-dev:24749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04* string.c (str_gsub): should have removed rb_str_unlocktmp(str).matz
[ruby-dev:24708] * ext/socket/socket.c (s_recvfrom): buffer modification check. [ruby-dev:24708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04* string.c (str_gsub): string modify check no longer based onmatz
tmplock. [ruby-dev:24706] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04* gc.c (gc_mark): enable GC stack checking.matz
* string.c (str_gsub): lock strings temporarily. [ruby-dev:24687] * ext/socket/socket.c (s_recvfrom): tmplock input buffer. [ruby-dev:24705] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7195 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-27* string.c (str_gsub): use STR_NOCAPA.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7123 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-27* string.c (str_gsub): use a string object for exception safeness.nobu
[ruby-dev:24601] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-21* string.c (rb_str_include): should not treat char as negative value.nobu
[ruby-dev:24558] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-20* parse.y (lex_getline): should not touch ruby_debug_lines ifmatz
RIPPER is defined. [ruby-dev:24547] * string.c (str_gsub): reentrant check. [ruby-dev:24432] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* io.c (read_all): block string buffer modification duringmatz
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* indent and tabifynobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-18* string.c (rb_str_upto): method result must be checked. [ruby-dev:24504]nobu
* eval.c (error_print): ditto. [ruby-dev:24519] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7065 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-10-02* string.c (rb_str_sum): should use bignums when bits is greatermatz
than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-02* string.c (rb_str_sum): wrong cast caused wrong result.matz
[ruby-dev:24385] * enum.c (enum_sort_by): hide temporary array from ObjectSpace.each_object. [ruby-dev:24386] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-02* string.c (rb_str_sum): check was done with false pointer.matz
[ruby-dev:24383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-01* string.c (rb_str_sum): string may be altered. [ruby-dev:24381]matz
* eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24373] * io.c (io_read): block string buffer modification during rb_io_fread() by freezing it temporarily. [ruby-dev:24366] * io.c (rb_io_s_popen): mode argument may be altered. [ruby-dev:24375] * file.c (rb_file_s_basename): ext argument may be altered. [ruby-dev:24377] * enum.c (enum_sort_by): use NODE instead of 2 element arrays. [ruby-dev:24378] * string.c (rb_str_chomp_bang): StringValue() may change the receiver. [ruby-dev:24371] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6976 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-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-08-19* dir.c (free_dir): fix memory leak. reported by yamamotomatz
madoka. * eval.c (bind_eval): new method. [RCR 251] * string.c (rb_str_clear): new method. [ruby-dev:24104] * io.c (rb_io_reopen): should clear allocated OpenFile. pointed out by Guy Decoux. [ruby-core:03288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-17* io.c (rb_io_reopen): should clear allocated OpenFile. pointedmatz
out by Guy Decoux. [ruby-core:03288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6781 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-17* string.c (rb_str_match_m): String#match should also takematz
optional argument. [ruby-core:03205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-05* string.c (str_new4): should share shared instance if it alreadymatz
exists. [ruby-dev:23665] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6429 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-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-15* eval.c (rb_yield_0): should not re-submit TAG_BREAK if thismatz
yield is not break destination. [ruby-dev:23197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-10* string.c (rb_str_match): raise TypeError when both arguments areusa
strings. [ruby-dev:22851] * string.c (rb_str_match2): removed. * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub (string.c): now not depend on version.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5662 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-25* string.c (rb_str_update): don't return any value.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-25* string.c (rb_str_update): call rb_str_modify().matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24MG added RDoc comments to string.cdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-30* string.c (rb_str_update): get rid of SEGV at just allocated String.nobu
[ruby-core:01812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-05* string.c: add #include "version.h". this file still depends on it.usa
* Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub: add version.h dependency to string.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4900 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