summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2009-07-13 * io.c (pipe_open): handles leaked on win32 when an error occurs.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10io.c (io_strip_bom): ungetbyte third byte when UTF-16LE.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10Fix condition of second byte of UTF-16LE/UTF-32LE.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10cosmetic changesnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09Set encoding and strip bom when modeenc string is "r:foo-bom" [ruby-dev:37236]naruse
* include/ruby/io.h (FMODE_STRIP_BOM): new constant. * io.c (io_encname_bom_p): judge whether the encoding name is *-bom or not. (parse_mode_enc): drop "-bom". (rb_io_modestr_fmode): set FMODE_STRIP_BOM if needed. (rb_io_extract_modeenc): ditto. (io_strip_bom): strip bom if exists. (io_set_encoding_by_bom): set encoding if there is bom. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* io.c (rb_io_ext_int_to_encs): Set external encoding ifnaruse
ext==intern. [ruby-dev:38278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-26* io.c (argf_rewind): need to rewind $. and ARGF.lineno.matz
[ruby-core:24046] * io.c (struct argf): refactoring on $. and ARGF.lineno behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-25* io.c (argf_binmode_m): should call rb_io_ascii8bit_binmode() tomatz
set its encoding to ASCII-8BIT. [ruby-core:24029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-24* io.c (rb_io_each_codepoint): uninitialized local variable enc.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22update rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22* io.c: remove __CHECKER__ test.akr
* dir.c: ditto. * dln.c: ditto. * file.c: ditto. * process.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22* ext/stringio/stringio.c (strio_each_codepoint): new method.matz
[ruby-core:23949] * ext/stringio/stringio.c (strio_each_codepoint): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22* io.c (rb_io_fdatasync): new method IO#fdatasync.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* array.c (rb_ary_memsize): added.ko1
* io.c (rb_io_memsize): added. * regcomp.c (onig_memsize): added. * string.c (rb_str_memsize): added. * transcode.c (rb_transcoding_memsize, rb_econv_memsize): added. * variable.c (rb_geneic_ivar_memsize): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* io.c (fptr_finalize): revert last change. [ruby-dev:38648]matz
* io.c (fptr_finalize): skip close(2) for fd 0,1,2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* io.c (fptr_finalize): should close stdin/stdout/stderr whenmatz
closed explicitly. [ruby-core:23853] * io.c (argf_skip): should close only when current_file is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-15* io.c (argf_each_line): should return self. [ruby-core:23852]matz
* io.c (argf_each_byte, argf_each_char): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-11* io.c (Init_IO): add constant File::NOATIME. [ruby-core:23194]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-07* io.c (pipe_open): should be rb_pid_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-26* io.c: fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-26* io.c (io_reopen): keeps pathv for prep_stdio. [ruby-dev:38131]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16* node.h (rb_notimplement_body_p): declared.akr
* vm_method.c (Init_eval_method): suppress a warning. * io.c (rb_io_fsync): use rb_f_notimplement if not implemented. (rb_io_close_on_exec_p): ditto. (rb_io_set_close_on_exec): ditto. (rb_io_fcntl): ditto. (rb_f_syscall): ditto. * dir.c (dir_tell): ditto. (dir_seek): ditto. (dir_s_chroot): ditto. * process.c (proc_getpgrp): ditto. (proc_setpgrp): ditto. (proc_getpgid): ditto. (proc_setpgid): ditto. (proc_setsid): ditto. (proc_getpriority): ditto. (proc_setpriority): ditto. (proc_getrlimit): ditto. (proc_setrlimit): ditto. (p_sys_setuid): ditto. (p_sys_setruid): ditto. (p_sys_seteuid): ditto. (p_sys_setreuid): ditto. (p_sys_setresuid): ditto. (p_sys_setgid): ditto. (p_sys_setrgid): ditto. (p_sys_setegid): ditto. (p_sys_setregid): ditto. (p_sys_setreuid): ditto. (p_sys_setresgid): ditto. (p_sys_issetugid): ditto. (proc_getgroups): ditto. (proc_setgroups): ditto. (proc_initgroups): ditto. (proc_daemon): ditto. (rb_proc_times): ditto. * file.c (rb_file_s_lchown): ditto. (rb_file_s_link): ditto. (rb_file_s_symlink): ditto. (rb_file_s_readlink): ditto. (rb_file_s_truncate): ditto. (rb_file_truncate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-01* thread.c (rb_thread_fd_select): new function to call selectmatz
using rb_fdset_t. * io.c (select_internal): use rb_thread_fd_select instead of rb_thread_select. based on the patch from Kengo Matsuyama. [ruby-dev:38221] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-28rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-24* io.c (rb_io_inspect): Cannot access fptr->fd if fptr is NULL.knu
This fixes a coredump caused by: ruby -e "class X < IO; def initialize; end; end; p X.new.inspect" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20* io.c (pipe_open): should pass program name even if multiplenobu
arguments are given. fix for TestProcess::test_argv0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19* io.c (rb_mWaitReadable): defined.akr
(rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* io.c (nogvl_copy_stream_read_write, copy_stream_body): use size_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11* io.c (copy_stream_fallback_body): off_t may be larger than long.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26 * include/ruby/win32.h (rb_w32_wopen): prototype forgotten.usa
* io.c (rb_sysopen_internal): shouldn't replace undefined chars in this case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 * io.c (sysopen_func, rb_sysopen_internal, rb_sysopen): open fileusa
by UTF-16'ed filename on Windows. * io.c (rb_file_open_generic, rb_io_s_sysopen, rb_io_reopen, argf_next_argv): follow above change. * io.c (rb_scan_open_args): no longer need to convert filepath here on Windows. * win32/wio32.c (rb_w32_wopen): new function to open file by UTF-16'ed filename. * win32/win32.c (rb_w32_open): call rb_w32_open(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* io.c (rb_io_getline_1): enables limit even if rs is given.nobu
[ruby-core:22434] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21* io.c (io_getpartial): error message describes what should beakr
waited after nonblocking error. (rb_io_write_nonblock): ditto. * ext/socket/init.c (s_recvfrom_nonblock): ditto. (s_accept_nonblock): ditto. * ext/socket/socket.c (sock_connect_nonblock): ditto. * ext/socket/ancdata.c (bsock_sendmsg_internal): ditto. (bsock_recvmsg_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18* io.c (pipe_open): sarg is always used unless HAVE_FORK.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18* io.c (rb_write_error2, argf_next_argv), process.c (rb_fork_err),nobu
random.c (fill_random_seed): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09* io.c (io_encoding_set): ignore second argument when external andnaruse
internal are same. [ruby-dev:37939] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08* io.c (rb_io_s_binread): ensures file path. [ruby-dev:37940]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06* io.c (io_fread): use rb_io_wait_readable for retryakr
avoid Errno::EINTR on ruby -e 'trap(:CHLD) {}; spawn("sleep 1"); STDIN.read' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06(pipe_open) [__SYMBIAN32__]: fixed compile time error azav
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05* include/ruby/intern.h (rb_run_exec_options_err): renamed fromakr
rb_run_exec_options. (rb_exec_err): renamed from rb_exec. (rb_fork_err): renamed from rb_fork. (rb_spawn_err): renamed from rb_spawn. (rb_run_exec_options): declared with 1.9.1 compatible signature. (rb_exec): ditto. (rb_fork): ditto. (rb_spawn): ditto. * process.c (rb_run_exec_options_err): renamed from rb_run_exec_options. (rb_exec_err): renamed from rb_exec. (rb_fork_err): renamed from rb_fork. (rb_spawn_err): renamed from rb_spawn. (rb_run_exec_options): defined. (rb_exec): ditto. (rb_fork): ditto. (rb_spawn): ditto. * io.c: follow above change. * ext/pty/pty.c: follow above change. [ruby-dev:37893] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e