aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* * bignum.c (rb_big_and): protect parameters from GC.matz2004-08-281-3/+0
| | | | | | | | | | | | [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
* * io.c (rb_io_check_writable): no need to check read buffer ifusa2004-08-201-1/+1
| | | | | | | already changed to write mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (free_dir): fix memory leak. reported by yamamotomatz2004-08-191-7/+6
| | | | | | | | | | | | | | 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
* * io.c (rb_io_reopen): should clear allocated OpenFile. pointedmatz2004-08-171-1/+1
| | | | | | | out by Guy Decoux. [ruby-core:03288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_buffered_data): extracted from rb_io_fread.akr2004-08-111-21/+136
| | | | | | | | (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
* * env.h: remove argv from ruby_frame.matz2004-07-281-1/+1
| | | | | | | | | | | | | | | | | | * 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
* * io.c (rb_io_popen): update the document for the first argument andnobu2004-06-291-209/+217
| | | | | | | | | | 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
* * io.c (rb_fopen, rb_fdopen, rb_io_reopen): setvbuf() may returnnobu2004-06-251-3/+3
| | | | | | | positive value on failure. [ruby-dev:23792] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (sock_sockaddr): Socket#gethostbyname()matz2004-06-241-7/+7
| | | | | | | | 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
* * io.c (rb_io_fread): return already read data when system call isnobu2004-06-241-3/+2
| | | | | | | interrupted. [ruby-talk:97206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io_seek()'s retval should be checked [ruby-core:03045]michal2004-06-231-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_initialize): should check fcntl result. [ruby-dev:23742]nobu2004-06-221-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_gets_m): set lastline ($_) even when read line ismatz2004-06-041-3/+1
| | | | | | | nil. [ruby-dev:23663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_fwrite): check all case errno != 0 [ruby-dev:23648]ocean2004-05-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_fwrite): should check if errnro == ENOENT, too.eban2004-05-271-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_fwrite): workaround for bcc32's fwrite bug.eban2004-05-271-2/+6
| | | | | | | add errno checking. [ruby-dev:23627] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_init_copy): copy also positions. [ruby-talk:100910]nobu2004-05-261-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_open): open should not ignore block when "to_open"matz2004-05-081-1/+5
| | | | | | | | | 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
* * parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz2004-05-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | 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
* * dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,nobu2004-04-181-3/+3
| | | | | | | | | | | | | | 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
* * array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,nobu2004-04-141-4/+4
| | | | | | | 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
* * io.c (rb_io_binmode): inverted condition. [ruby-dev:23349]nobu2004-04-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): use NUM2INT() instead of num2i32().matz2004-04-071-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_get_path): get path string via "to_path" method ifmatz2004-04-071-39/+41
| | | | | | | | | | | | 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
* * error.c (Init_Exception): remove Exception#to_str. [Ruby2]matz2004-04-051-3/+10
| | | | | | | | | | | * 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
* * pack.c (pack_pack): raises RangeError if uv is out of UTF8 valuematz2004-03-311-0/+3
| | | | | | | | | | 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
* * variable.c (rb_cvar_set): class variables become private to thematz2004-03-191-1/+0
| | | | | | | | | | | 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
* * eval.c (rb_yield_0): should not re-submit TAG_BREAK if thismatz2004-03-151-2/+2
| | | | | | | 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
* * struct.c (rb_struct_s_def): Struct::new executes block withmatz2004-03-101-2/+3
| | | | | | | | | | 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
* * io.c (pipe_open): erred program name should be reported bynobu2004-03-021-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | exceptions, instead of the first argument. * process.c (rb_spawn): ditto. * process.c (proc_spawn_v): use first argument as program name. * win32/win32.c (rb_w32_aspawn): ditto. * win32/win32.c (CreateChild): search executable file if no program name given. * lib/drb/extservm.rb (invoke_service_command): use Process.spawn. [ruby-dev:23103] * lib/rdoc/ri/ri_display.rb (setup_pager): use IO.popen. [ruby-dev:23086], [ruby-dev:23103] * lib/rdoc/diagram.rb (convert_to_png): ditto. * lib/rdoc/generators/chm_generator.rb (compile_project): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_free), io.c (rb_io_fptr_finalize), rubyio.h (OpenFile):nobu2004-02-251-11/+56
| | | | | | | | | sharing OpenFile. * io.c (rb_io_initialize): accept IO instance. [ruby-dev:22195] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): fix typo.nobu2004-02-201-1/+1
| | | | | | | | * win32/win32.c (CreateChild): first argument to CreateProcess() must have path, not just basename. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check functions, fork spawnv.nobu2004-02-161-126/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | * io.c (rb_io_s_popen): accept argv not only single command line. * process.c (rb_proc_exec_n): export. * process.c (rb_check_argv): check if arguments are safe to invoke. * process.c (rb_fork): retry to fork. * process.c (rb_spawn): spawn child process asynchronously. * process.c (rb_f_system): raise an exception if the command could not execute. * win32/win32.c (rb_w32_argv_size): count necessary size for joined arguments. * win32/win32.c (rb_w32_join_argv): join arguments with quoting. * win32/win32.c (rb_w32_pipe_exec, rb_w32_spawn, rb_w32_aspawn): accept program name adding to command line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove references to defoutdave2004-01-261-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c, error.c, file.c, io.c, numeric.c, object.c, re.c, struct.c,nobu2004-01-181-0/+1
| | | | | | | time.c: marked init_copy functions nodoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_read): do not append EOF. (ruby-bugs-ja:PR#585)nobu2004-01-151-2/+5
| | | | | | | | * io.c (rb_io_fwrite): ad-hockery hack to get rid of HP-UX stdio weird behavior. [ruby-dev:22424] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (fptr_finalize): should save errno just after failure.nobu2004-01-061-7/+8
| | | | | | | [ruby-dev:22492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.matz2004-01-021-5/+4
| | | | | | | | | | | | [ruby-dev:22476] * io.c (argf_eof): ARGF.eof? should not have any side effect. [ruby-dev:22469] * io.c (argf_each_byte): should return self. [ruby-dev:22465] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_readline): should raise EOFError at the end ofmatz2003-12-301-16/+16
| | | | | | | | | | | | | | | files. [ruby-dev:22458] * io.c (argf_read): should concatenate input files when length argument is nil. [ruby-dev:22450] * io.c (argf_read): should update supplied string buffer (2nd argument) even when IO#read is called multiple times. * io.c: should initialize lineno by zero. [ruby-dev:22460] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add RDoc for kernel functions, and tidy updave2003-12-301-0/+278
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added RDoc for class IOdave2003-12-271-2/+819
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (next_argv): warn always for stdin on inplace edit mode.matz2003-12-261-10/+26
| | | | | | | | | * io.c (read_all): need to check string value. * io.c (argf_read): allow ARGF.read(nil). [ruby-dev:22433] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_backquote): need not to check nil result.matz2003-12-261-2/+1
| | | | | | | | | | | | | | | [ruby-core:02078] * io.c (rb_io_getline): should return nil on eof, even when nil rs is specified. [ruby-core:02077] * pack.c (pack_pack): add sign check for 'i', and 'l'. [ruby-dev:22427] * bignum.c (rb_quad_pack): add range check for 'quad int'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * MANIFEST: add vms/config.h and remove vms/config.h_in.usa2003-12-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [VMS] "rfm=stmlf" is specified for open() and fopen().akiyoshi2003-12-261-5/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (catch_timer): do not call rb_thread_schedule() inside tomatz2003-12-241-3/+3
| | | | | | | | | | | | | | | | | | | avoid pthread_mutex_lock() deadlock. interrupts to system calls are detected by TRAP_END via EINTR error. * eval.c (thread_timer): do not post signal unless it is absolutely necessary. * rubysig.h (TRAP_END): add CHECK_INTS to switch thread. * regex.c (re_compile_pattern): check if nextp is smaller than pend. [ruby-dev:22372] * eval.c (umethod_bind): remove method overridden check. [ruby-dev:22366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Forgot to save buffer.... sighdave2003-12-241-0/+64
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): do not return nil at the end of file.matz2003-12-231-22/+21
| | | | | | | | | | | | | | | | | | | | | | | [ruby-dev:22334] * io.c (argf_read): do not depend on nil at eof behavior of IO#read(). * eval.c (rb_thread_join): dup exception before re-raising it. * io.c (rb_io_eof): call clearerr() to prevent side effect. this patch is supplied by Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>. [ruby-dev:22234] * pack.c (OFF16): get offset for big endian machines. * pack.c (pack_pack): use OFF16 instead of OFF16B. [ruby-dev:22344] * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_ungetc): raise an exception at unread stream tonobu2003-12-231-2/+3
| | | | | | | | | | avoid unspecified behavior. [ruby-dev:22330] * test/ruby/test_system.rb (test_syntax): glob relatively from __FILE__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): remove unnecessary negative value check.matz2003-12-231-0/+1
| | | | | | | | | | [ruby-dev:22329] * io.c (rb_io_ungetc): need fflush before ungetc if write buffer is filled. [ruby-dev:22330] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e