summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
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/trunk@7140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-29* eval.c (ruby_cleanup): ruby_finalize_1 may cause exception,matz
should be wrapped by PUSH_TAG/POP_TAG(). [ruby-dev:24627] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7127 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-21* ext/zlib/zlib.c (zstream_shift_buffer): should restore classmatz
field of a buffer. [ruby-dev:24562] * eval.c (rb_alias): should warn on method discarding. [ruby-dev:24546] * ext/zlib/zlib.c (zstream_expand_buffer_into): hide internal string buffer by clearing klass. [ruby-dev:24548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-21* io.c (pipe_open): variable name "fpw" is conflicted.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7093 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-20* 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/trunk@7085 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-18* io.c (rb_io_flags_mode, rb_io_mode_flags): distinguish whether filenobu
not existing is created. [ruby-dev:24505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-12* io.c (MODE_BINMODE, MODE_BINARY): fixed reversed condition.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7031 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/trunk@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/trunk@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/trunk@7010 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_modenum_mode): typo fix again.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7000 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-05* io.c (rb_io_flags_mode): typo fix.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6998 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-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/trunk@6995 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-19* ext/zlib/zlib.c (gzfile_read_raw): call readpartial at first.akr
(Zlib::GzipReader#readpartial): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-28* bignum.c (rb_big_and): protect parameters from GC.matz
[ruby-talk:110664] * error.c (exc_equal): exceptions are equal if they share same class, message and backtrace. [ruby-talk:110354] * error.c (name_err_mesg_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-20* io.c (rb_io_check_writable): no need to check read buffer ifusa
already changed to write mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6801 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-08-11* io.c (read_buffered_data): extracted from rb_io_fread.akr
(io_readpartial): new method IO#readpartial. [ruby-dev:24055] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-28* env.h: remove argv from ruby_frame.matz
* eval.c (rb_eval): no more copy on write. * eval.c (assign): ditto. * eval.c (rb_call0): can receive *rest by specifying negative argc. (-1 means 0 arg and *rest, -2 means 1 arg and *rest...) * eval.c (rb_call0): properly set frame's argc counter. * gc.c (rb_gc_mark_frame): need not to mark frame's argv * gc.c (run_final): wrong order of data. [ruby-dev:23948] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-29* io.c (rb_io_popen): update the document for the first argument andnobu
exceptions. * process.c (rb_f_exec, rb_f_system): update the document for exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-25* io.c (rb_fopen, rb_fdopen, rb_io_reopen): setvbuf() may returnnobu
positive value on failure. [ruby-dev:23792] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-24* ext/socket/socket.c (sock_sockaddr): Socket#gethostbyname()matz
should give us packed address, not struct sockaddr. [ruby-core:03053] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6515 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/trunk@6510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-23io_seek()'s retval should be checked [ruby-core:03045]michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6505 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/trunk@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/trunk@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/trunk@6422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27* io.c (rb_io_fwrite): should check if errnro == ENOENT, too.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6416 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/trunk@6415 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/trunk@6406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-08* io.c (rb_f_open): open should not ignore block when "to_open"matz
method is used. [ruby-dev:23478] * ext/dbm/dbm.c (fdbm_modify): typo fixed. [ruby-dev:23473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6276 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-18* dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,nobu
lib/date.rb, 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/pop.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/trunk@6178 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-08* io.c (rb_io_binmode): inverted condition. [ruby-dev:23349]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-07* pack.c (pack_pack): use NUM2INT() instead of num2i32().matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6120 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-04-05* error.c (Init_Exception): remove Exception#to_str. [Ruby2]matz
* eval.c (error_print): should no call "to_str" anymore use "message" method instead. * io.c (rb_f_open): Kernel#open() calls "to_open" if the first argument responds to it. [Ruby2] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-31* pack.c (pack_pack): raises RangeError if uv is out of UTF8 valuematz
range. [ruby-dev:23281] * io.c (rb_io_binmode): stdio buffer should be empty when calling IO#binmode. [ruby-talk:96155] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-19* variable.c (rb_cvar_set): class variables become private to thematz
particular class/module. [Ruby2] * variable.c (rb_cvar_get): ditto. * io.c (rb_io_sync): need not to check writable. [ruby-core:02674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5977 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-03-10* struct.c (rb_struct_s_def): Struct::new executes block withmatz
generated struct class. [ruby-talk:02606] * io.c (rb_io_ungetc): raise IOError instead of calling rb_sys_fail(). [ruby-talk:23181] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e