summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2004-12-08* io.c (io_fwrite): change dereference for cosmetic reason.matz
* sprintf.c (rb_f_sprintf): [ruby-dev:25104] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07io.c (io_fwrite) : fix offset incrementation for VMS and Human68k.akiyoshi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07* io.c (io_write): remove rb_str_locktmp(). [ruby-dev:25050]matz
* io.c (io_fwrite): takes VALUE string as an argument. [ruby-dev:25050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-03* eval.c (proc_invoke): copy arguments to frame.argv.matz
[ruby-core:03861] * object.c (convert_type): use rb_respond_to() again. [ruby-dev:25021] * eval.c (rb_respond_to): funcall respond_to? if it's redefined. [ruby-dev:25021] * io.c (rb_file_initialize): [ruby-dev:25032] * lib/ostruct.rb (OpenStruct::Marshaler): OpenStruct can be marshaled again. [ruby-core:03862] * io.c (rb_io_ctl): [ruby-dev:25019] * io.c (io_fread): need not to null terminate. [ruby-dev:24998] * io.c (read_all): remove unnecessary rb_str_resize(). [ruby-dev:24996] * io.c (io_read): ditto. * io.c (rb_io_sysread): use temporary lock. [ruby-dev:24992] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-30* io.c (io_fread): need not to null terminate. [ruby-dev:24998]nobu
* io.c (read_all): remove unnecessary rb_str_resize(). [ruby-dev:24996] (backported from CVS HEAD) * io.c (io_readpartial): ditto. * io.c (io_read): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29* io.c (fptr_finalize): must not use FILE after fclose().nobu
[ruby-dev:24985] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-28don't use READ_DATA_PENDING in previous changeakr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-28* io.c (rb_io_check_writable): restrict io_seek byakr
READ_DATA_PENDING because io_seek(fptr, 0, SEEK_CUR) is meaningful only if read buffer is not empty. call io_seek regardless of NEED_IO_SEEK_BETWEEN_RW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-27io.c (rb_io_fwrite): set path to NULLakr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-27* io.c: avoid avoid data loss with nonblocking fd andakr
stdio buffering in sync mode. [ruby-dev:24966] based on matz's patch [ruby-dev:24967] (io_fwrite): new primitive writing function which writes directly if sync mode. (rb_io_fwrite): wrapper for io_fwrite now. (io_write): call io_fwrite instead of rb_io_fwrite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-27* io.c (io_fread): [ruby-dev:24964]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25* io.c (io_read): move StringValue() check before GetOpenFile().matz
[ruby-dev:24959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25* io.c (read_all): [ruby-dev:24955]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-23* io.c (io_read): [ruby-dev:24952]matz
* configure.in, io.c: cancel [ ruby-Patches-1074 ]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-22* file.c (rb_file_chown): integer conversion should be prior tomatz
GetOpenFile(). [ruby-dev:24947] * file.c (rb_file_truncate): ditto. * file.c (rb_file_s_truncate): ditto. * dir.c (dir_seek): use NUM2OFFT(). * misc/ruby-mode.el (ruby-non-block-do-re): [ruby-core:03719] * dir.c (dir_seek): should retrieve dir_data after NUM2INT(). [ruby-dev:24941] * string.c (rb_str_splice): should place index wrapping after possible modification. [ruby-dev:24940] * eval.c (error_print): nicer traceback at interrupt. [ruby-core:03774] * string.c (str_gsub): internal buffer should not be listed by 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. * string.c (str_gsub): internal buffer should not be listed by ObjectSpace.each_object(). [ruby-dev:24919] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18* io.c, rubyio.h (rb_io_modenum_flags): exported.nobu
* ext/stringio/stringio.c (strio_initialize): allow Fixnum as mode as well as IO.new does. [ruby-dev:24896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7304 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/branches/ruby_1_8@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-05* string.c (rb_str_locktmp): check STR_TMPLOCK flag beforematz
locking. [ruby-dev:24727] * gc.c (gc_mark): stricter GC stack check. * string.c (str_gsub): should have removed rb_str_unlocktmp(str). [ruby-dev:24708] * string.c (str_gsub): string modify check no longer based on tmplock. [ruby-dev:24706] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04* typo, too. orzusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04* io.c (rb_f_open): fix typo.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-03* io.c (pipe_open): fix compile errornagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01* eval.c (proc_invoke): nail down dyna_var node when Proc objectmatz
or continuation is created. [ruby-dev:24671] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30* string.c (rb_str_locktmp): lock string temporarily.matz
* 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/branches/ruby_1_8@7149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-29* io.c (rb_io_check_initialized): new function to check uninitializednobu
object. [ruby-talk:118234] * file.c (rb_file_path), io.c (rb_io_closed): check if initialized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27* string.c (RESIZE_CAPA): check string attribute before modifyingmatz
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. * 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. * eval.c (frame_free): Guy Decoux solved the leak problem. Thanks. [ruby-core:03549] * ext/zlib/zlib.c (zstream_append_input): clear klass for z->input to avoid potential vulnerability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-26* io.c (rb_io_getline): rs modification check should not interfere in the loop.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7114 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/branches/ruby_1_8@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-14* io.c (MODE_BINMODE, MODE_BINARY): fixed reversed condition.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-09* io.c (rb_io_getline): should not treat char as negative value.nobu
[ruby-dev:24460] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-07* io.c (io_read): should freeze buffer before thread contextmatz
switch. [ruby-dev:24442] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-07* pack.c (pack_unpack): string conversion should at the top of thematz
method. [ruby-dev:24439] * io.c (io_read): buffer should be frozen only after the length check. [ruby-dev:24440] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_flags_mode): typo fix.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_s_sysopen): preserve path in the buffer allocated bymatz
ALLOCA_N() to prevent modification. [ruby-dev:24438] * io.c (rb_io_mode_flags): preserve append mode flag. [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] * 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] * string.c (rb_str_sum): should use bignums when bits is greater than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395] * eval.c (specific_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24382] * eval.c (specific_eval): defer pointer retrieval to prevent unsafe sourcefile string modification. [ruby-dev:24382] * string.c (rb_str_sum): wrong cast caused wrong result. [ruby-dev:24385] * enum.c (enum_sort_by): hide temporary array from ObjectSpace.each_object. [ruby-dev:24386] * string.c (rb_str_sum): check was done with false pointer. [ruby-dev:24383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-04* io.c (rb_file_open_internal, rb_io_reopen): fname might be alterednobu
while GC. [ruby-dev:24408] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-02* string.c (rb_str_sum): check was done with false pointer.matz
[ruby-dev:24383] * string.c (rb_str_sum): string may be altered. [ruby-dev:24381] * 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/branches/ruby_1_8@6979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-19Update for VMS ports.akiyoshi
* dln.c (dln_load): Modify to call lib$find_image_symbol for VMS. * io.c (rb_io_fwrite): Use fputc() for VMS non-stream file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6793 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/branches/ruby_1_8@6780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-24* io.c (rb_io_fread): return already read data when system call isnobu
interrupted. [ruby-talk:97206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-22* io.c (rb_io_initialize): should check fcntl result. [ruby-dev:23742]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-04* io.c (rb_io_gets_m): set lastline ($_) even when read line ismatz
nil. [ruby-dev:23663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27* io.c (rb_io_fwrite): check all case errno != 0 [ruby-dev:23648]ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27* io.c (rb_io_fwrite): workaround for bcc32's fwrite bug.eban
add errno checking. [ruby-dev:23627] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-26* io.c (rb_io_init_copy): copy also positions. [ruby-talk:100910]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07* eval.c (rb_eval): too many line trace call. (ruby-bugs PR#1320)matz
* 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] * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-18* dln.c, io.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb, lib/date.rb,nobu
lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb, lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb, lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb, lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb, lib/rinda/tuplespace.rb, lib/shell/command-processor.rb, lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb, lib/test/unit/testsuite.rb: typo fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6179 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/branches/ruby_1_8@6158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-19* io.c (rb_io_sync): need not to check writable. [ruby-core:02674]matz
* eval.c (proc_eq): avoid false positive by using scope and dyna_vars. no longer use frame.uniq. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5978 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/branches/ruby_1_8@5953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-10* eval.c (return_jump): set return value to the returnmatz
destination. separated from localjump_destination(). * eval.c (break_jump): break innermost loop (or thread or proc). * eval.c (rb_yield_0): set exit_value for block break. * eval.c (eval): Only print backtrace if generating the backtrace doesn't generate an exception. [ruby-core:02621] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-26Remove references to defoutdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e