summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2008-12-23* io.c (rb_io_init_copy): call io_seek only if io_tell succeeds.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* process.c (rb_fork): propagete an error message from child to parent.akr
(rb_f_exec): show details of error in child process on exception. (save_redirect_fd): add error message arguments. (run_exec_dup2): ditto. (run_exec_close): ditto. (run_exec_open): ditto. (run_exec_dup2_child): ditto. (run_exec_pgroup): ditto. (run_exec_rlimit): ditto. (rb_run_exec_options): ditto. (rb_exec): ditto. (rb_exec_atfork): ditto. (rb_spawn_internal): ditto. (rb_spawn): ditto. (rb_f_system): follow arguments change. (proc_daemon): ditto. (rb_f_spawn): show details of error in child process on exception. * io.c (popen_exec): add error message arguments. (pipe_open): show details of error in child process on exception. * include/ruby/intern.h (rb_run_exec_options): add error message arguments. (rb_exec): ditto. (rb_fork): ditto. (rb_spawn): ditto. * ext/pty/pty.c (chfunc): add error message arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* io.c: rdoc for File::open and 1.9 feature in file modes.yugui
* transcode.c: rdoc for String#encode git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* io.c (rb_io_inspect): show fd number if there is no pathname.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 * io.c (pipe_open): need to initialize args.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* io.c (pipe_close): fix coding style. [ruby-dev:37554]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22* io.c (rb_io_s_pipe): IO.pipe can take a block.akr
(pipe_close): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-20* dln.c (dln_find_1): supplements an extension for executablenobu
files on DOSish platforms. * io.c (pipe_open): use rb_w32_aspawn() for array form. * win32/win32.c (rb_w32_pipe_exec): no longer used. * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): deals with batch files and commands with extensions. [ruby-core:20695] * win32/win32.c (has_redirection): supports environment variables references. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19* io.c (rb_io_extract_encoding_option): "internal_encoding: nil"matz
to specify no-transcoding. and other corner case fixed. [ruby-dev:37496] * hash.c (rb_hash_lookup2): new function to look-up hash with default value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-10rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04* io.c (io_binwrite): arg.offset should be updated after retry.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 * win32/win32.c (rb_w32_read): ERROR_BROKEN_PIPE is not a real errorusa
at this point. * io.c (pipe_open): use rb_w32_spawn() instead of rb_w32_pipe_exec() to use our own redirection scheme. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03update rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03* io.c (rb_io_getc, rb_io_readchar): documentation correction fromnobu
Emiel van de Laar. [ruby-core:20212] * ext/stringio/stringio.c (strio_ungetbyte): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-07* include/ruby/io.h (rb_io_t): added write_lock to serialize.nobu
[ruby-core:19668] * gc.c (gc_mark_children): mark write_lock. * gc.c (rb_gc_call_finalizer_at_exit): Mutex also needs to be deferred. * io.c (io_fflush, io_binwrite, fptr_finalize): serializes writing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* io.c (rb_io_rewind): should reset fptr->readconv if it'smatz
available. * io.c (more_char): clear readconv at EOF. * test/ruby/test_file.rb: should not read after EOF. use rewind instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 * io.c (extract_binmode): new function to extract binmode/textmodeusa
options from hash. * io.c (rb_io_extract_modeenc): use above function. * io.c (rb_io_s_pipe): recognize binmode/textmode options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 * io.c (make_readconv): now can specify the size of cbuf.usa
* io.c (read_all, appendline, io_getc, rb_io_ungetc): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27* io.c (argf_init): initial value of $. should be 0.nobu
see [ruby-dev:36937]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 * io.c (read_all): the 3rd argument maybe Qnil.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26* io.c (read_all): use the given buffer to read when needs readconv.nobu
based on the patch by wanabe <s.wanabe AT gmail.com> at [ruby-dev:36931]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22* io.c (pipe_open): remove unnecessary flush before fork.matz
a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com> in [ruby-dev:36840]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* io.c (open_key_args): should adjust argc, argv in structmatz
foreach_arg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* ext/zlib/zlib.c: remove obsolete prototype macros.matz
* ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile structure. * ext/zlib/zlib.c (rb_gzreader_getc): now works on characters. * ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve single byte. * ext/zlib/zlib.c (rb_gzreader_readbyte): ditto. * ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char * ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings. * ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* io.c, include/ruby/intern.h (rb_io_ascii8bit_binmode): externed.shugo
* ext/socket/socket.c (init_sock): use rb_io_ascii8bit_binmode() instead of rb_io_binmode(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* io.c (rb_file_open_internal): should initialize fmode before using.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20* io.c (rb_io_extract_modeenc): plain rb/wb should set ASCII-8BITmatz
to the external_encoding. * io.c (rb_file_open_internal): ditto. * io.c (NEED_WRITECONV): no conversion when the external_encoding is ASCII-8BIT. * io.c (do_writeconv): skip ASCII-8BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20* io.c (rb_io_ascii8bit_binmode): renamed from rb_io_binmode.akr
(rb_io_binmode): don't change encoding conversion. (rb_io_binmode_m): call rb_io_ascii8bit_binmode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16* io.c (rb_io_binmode): reset encoding conversion.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16* io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):mame
remove deprecated functions which do not work. [ruby-dev:36697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14* io.c (Init_IO): $FILENAME and $* must be read-only. [ruby-dev:36698]nobu
* variable.c (*_getter, *_setter, *_marker): made public. * include/ruby/ruby.h (rb_gvar_*_{getter,setter,marker}): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-11rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-07* encoding.c (rb_default_internal_encoding): merged a patch frommatz
Michael Selig <michael.selig at fs.com.au> in [ruby-core:18985]. * io.c (rb_io_ext_int_to_encs): ditto. * ruby.c (proc_options): support default internal encoding in -E option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports VMS.yugui
* error.c: ditto. * eval.c: ditto. * eval_intern.h: ditto. * include/ruby/defines.h: ditto. * include/ruby/ruby.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * vms/config.h: removed. * vms/vms.h: ditto. * vms/vmsruby_private.c: ditto. * vms/vmsruby_private.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports MS-DOS.yugui
* ext/sdbm/_sdbm.c: ditto. * ext/sdbm/sdbm.h: ditto. * gc.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/util.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * strftime.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.yugui
* djgpp/README.djgpp: ditto. * djgpp/config.hin: ditto. * djgpp/config.sed: ditto. * djgpp/configure.bat: ditto. * djgpp/mkver.sed: ditto. * ext/Setup.dj: ditto. * dln.c: removed djgpp supports. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * signal.c: ditto. * util.c: ditto. * vm_core.h: ditto. * lib/fileutils.rb: ditto. * lib/mkmf.rb: ditto. * ext/socket/socket.c: ditto. * test/fileutils/test_fileutils.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_path.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* x68/_dtos18.c: removed. Ruby no longer supports human68k.yugui
* x68/_round.c: ditto. * x68/fconvert.c: ditto. * x68/select.c: ditto. * ext/Setup.x68: ditto. * missing/x68.c: ditto. * dln.c (dln_find_exe_r): removed human68k supports. (dln_find_1): ditto. * lib/mkmf.rb: ditto. * ext/extmk.rb (Init_ext): ditto. * ext/socket/socket.c (init_sock): ditto. * gc.c (GC_MALLOC_LIMIT): ditto. (rb_setjmp, rb_jmpbuf): ditto. (mark_current_machine_context): ditto. * include/ruby/defines.h (PATH_ENV): ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_path.rb: ditto. * LEGAL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30* io.c (rb_io_extract_modeenc): should honor value of thematz
textmode: and binmode: options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26* include/ruby/encoding.h (rb_str_encode): renamed fromakr
rb_str_transcode. [ruby-dev:36593] (rb_econv_has_convpath_p): renamed from rb_transcode_convertible. * transcode.c: follow the renaming. * io.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24* io.c (rb_io_mode_enc): make it static.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24* io.c (rb_io_s_binread): offset argument was wrongly passed tomatz
internal IO#read call. [ruby-core:18810] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* io.c (io_binwrite): allocate wbuf if nosync.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* io.c (copy_stream_body): use io_binwrite instead of io_fwrite.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* io.c (io_binwrite): add nosync argument.akr
(do_writeconv): extracted from io_fwrite. (io_fwrite): add nosync argument. use do_writeconv. (io_write): add nosync argument. (io_write_m): new function for IO#write. (rb_p): don't append record separator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* io.c (rb_io_s_binread): a new method to read binary chunk from amatz
file. [ruby-core:18674] * io.c (open_key_args): wrong permission specified for read-open. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e