summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2012-04-14merge revision(s) 35296: [Backport #6295]naruse
* io.c (rb_io_eof): use eof() instead of io_fillbuf(). It's because io_unread() doesn't work properly when reading CRLF with read(length) and mode 'r'. [ruby-core:44189][Bug #6271] * test/ruby/test_io_m17n.rb (TestIO_M17N#test_read_crlf_and_eof): test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14merge revision(s) 34785,35095,35098,35111,35152: [Backport #6294]naruse
* io.c (set_binary_mode_with_seek_cur): reorder function qualifiers. * test/ruby/test_io.rb (TestIO#test_pos_with_getc): added. see [Bug #6179][ruby-core:43518] * test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated. see [ruby-core:43550] * io.c (static int io_fflush): add the definition. Use it in set_binary_mode_with_seek_cur(). * io.c (set_binary_mode_with_seek_cur): refactoring to split the content into io_unread(). Fix the possibility of buffer overflow. * io.c (io_unread): add new implementation for Windows. Previous one caused invalid cursor position using IO#pos with OS text mode. New one fixes the bug. * test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_dont_move_cursor_position): add a test for above bug. [ruby-core:43497] [Bug #6179] * io.c (io_unread): fixed memory leak. report by nagachika via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07merge revision(s) 35255:naruse
* io.c (io_unread): cast as long the value for extra_max. [ruby-core:44137] [Bug #6257] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06merge revision(s) 33172,33968:nobu
* ext/io/console/console.c (console_set_winsize): remove unused variable. * io.c (Init_IO): Mention io/console methods. [Ruby 1.9 - Bug #5602] * ext/io/console/console.c: Mention that io/console must be required similar to lib/time.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25merge revision(s) 34786,34787,34788,34789:naruse
* dir.c, file.c, io.c: use rb_sys_fail_path. * error.c: new functions to deal exceptions with string instances. * dir.c, file.c, io.c (rb_sys_fail_path): use rb_sys_fail_str. * test/ruby/test_literal.rb (TestRubyLiteral#test_special_const): test for https://bugs.php.net/bug.php?id=61095 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25merge revision(s) 34795:naruse
* dir.c (dir_inspect), io.c (rb_io_inspect): keep encoding of path. [Bug #6072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22merge revision(s) 34735,34736:nobu
* io.c (rb_io_s_foreach): return enumerator including kerword arguments. [ruby-dev:45267][Bug #6054] * io.c (rb_io_s_foreach): argument check before making Enumerator. [ruby-dev:31525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-13merge revision(s) 34576:nobu
* io.c (Init_IO): use directive hack to make ARGF documentable in other tools. [ruby-core:42515][Bug #6007] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10merge revision(s) 34043,34045,34132: [Backport #5791]naruse
* win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function. * win32/win32.c (init_stdhandle): set default mode of stdin as binmode. * io.c (set_binary_mode_with_seek_cur): new function to replace SET_BINARY_MODE_WITH_SEEK_CUR macro. now returns previous mode of the fd and take care of LF in rbuf. * io.c (do_writeconv): set text mode when needed. * io.c (io_read): need to change the mode of the IO to binmode temporally when the length for IO#read, because IO#read with length must behave so. * test/ruby/test_io_m17n.rb (TestIO_M17N#est_{read_with_length, read_with_length_binmode,get[cs]_and_read_with_binmode, read_with_binmode_and_get[cs],read_write_with_binmode}): tests for above changes. all patches are written by Hiroshi Shirosaki. [ruby-core:41496] [Feature #5714] * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_binmode_and_get[cs]}): only for Windows. * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_length, * io.c (rb_sys_fail_path): move the definition. Move above for using it in set_binary_mode_with_seek_cur(). * io.c (set_binary_mode_with_seek_cur): fix improper seek cursor. Seeking file cursor with setting binary mode has possibility to cause infinite loop. Fixed the bug and refined error handling. Introduced at r34043. And cleanups as below. Remove unnecessary parentheses of `fptr`. Use return value of setmode(). * test/ruby/test_io_m17n.rb (TestIO_M17N#test_seek_with_setting_binmode): add a test for abobe. [ruby-core:41671] [Bug #5714] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10merge revision(s) 33937: [Backport #5704]naruse
* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] * include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE decorator. * io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and NEED_WRITECONV to replace universal newline decorator by CRLF only when required to improve file reading and writing under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] * io.c (do_writeconv): adjust binary mode if required. * io.c (read_all, appendline, swallow, rb_io_getline_1): ditto. * io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto. * io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto. * io.c (rb_io_extract_modeenc, rb_sysopen): ditto. * io.c (pipe_open, prep_stdio, io_encoding_set): ditto. * io.c (rb_io_s_pipe, copy_stream_body): ditto. * test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in binary mode. * win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle initialization. * win32/win32.c (rb_w32_write): use FTEXT mode accordingly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10merge revision(s) 33662,33666,33770: [Backport #5793]naruse
------------------------------------------------------------------------ r33662 | usa | 2011-11-08 02:48:11 +0900 (Tue, 08 Nov 2011) | 18 lines * include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK, ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro. * io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv): set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO if the flag is available. * io.c (make_writeconv): drop decorators for reading. * io.c (make_readconv): drop decorators for writing. * io.c (do_writeconv): existing writeconv is not the condition to raise ArgumentError. should check textmode or not. * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above changes. ------------------------------------------------------------------------ * include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK, ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro. * io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv): set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO if the flag is available. * io.c (make_writeconv): drop decorators for reading. * io.c (make_readconv): drop decorators for writing. * io.c (do_writeconv): existing writeconv is not the condition to raise ArgumentError. should check textmode or not. * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above changes. * io.c (argf_next_argv): wrong timing of setting ecflags. fixed the failure of TestArgf#test_textmode introduced at r33662. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09merge revision(s) 34409,34412,34417:naruse
* io.c (argf_close): skip stdin, which should be readable again. [ruby-dev:45160] [Bug #5952] * io.c (argf_readlines): reinitialize after all read to be readable again. * io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace. r34409 breaks replacing ARGV. [ruby-dev:45160] [Bug #5952] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-06merge revision(s) r33826:kosaki
* io.c (rb_io_fsync,rb_io_fdatasync): release GVL during fsync(). fsync() and fdatasync() may take a long time on slow disks and/or if there is much dirty data. Patch by Eric Wong. [Feature #5665] [ruby-core:41247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-06merge revision(s) 33691,33692:naruse
* io.c (rb_update_max_fd): fstat(2) can fail with other than EBADF. [ruby-dev:44837] [Backport #4339]. Cf. http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html EBADF. [ruby-dev:44837] [Bug #5593]. Cf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-06merge revision(s) 33667:usa
* io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is set. this is the one of the reason of IO writing slowness of Windows in 1.9.3 or later. [Backport #5592] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-20* io.c: Improve rdoc for {File|IO}.writemarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07* io.c (make_writeconv): unversal_newline converter is for reading.tarui
so, if the io is text mode and has ECONV_UNIVERSAL_NEWLINE_DECORATOR flag, use crlf_newline converter for writing. this change fixes the problem about the luck of CR up Kernel.p and Kernel.puts to stdout/stderr on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-07* io.c (io_fflush): remove fsync().arton
* io.c (rb_io_flush, rb_io_rewind): fsync() here. These pathces are backports of trunk r33651 for [Bug #5585] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-07merge revision(s) 33171:kosaki
* io.c (argf_next_argv): open in default text mode. [ruby-core:39234] [Bug #5268] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-02* io.c (validate_enc_binmode, prep_stdio): default to text mode onnobu
dosish platforms. [ruby-core:38822] [Bug #5164] * transcode.c (rb_econv_prepare_options): keep default ecflags unchanged if no options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30* io.c (rb_io_each_byte): rbuf can be refreshed during yield.nobu
[Bug #5119] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23* io.c (rb_update_max_fd): validate fd.akr
* ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add msg_peek_p argument for the declaration. * ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument. assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd when MSG_PEEK. (rsock_discard_cmsg_resource): add msg_peek_p argument. (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with msg_peek_p argument. * ext/socket/unixsocket.c (unix_recv_io): call rsock_discard_cmsg_resource with msg_peek_p argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20* backport r32579, r32581, r32587 by akr and r32588 by kazu.akr
r32579: * io.c (rb_update_max_fd): new function. * internal.h (rb_update_max_fd): declare rb_update_max_fd. * thread_pthread.c (rb_thread_create_timer_thread): update max fd when timer thread pipe is created. r32581: * io.c (UPDATE_MAXFD): removed. r32587: * include/ruby/intern.h (rb_update_max_fd): declaration moved from internal.h. * file.c: ditto. * io.c: call rb_update_max_fd for each new fds. * process.c: ditto. * random.c: ditto. * ruby.c: ditto. * ext/io/console/console.c: ditto. * ext/openssl/ossl_bio.c: ditto. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. r32588: * io.c (rb_update_max_fd): remove parentheses. they are not in macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-09 * io.c: Note that methods other than IO#gets may increase IO#lineno.drbrain
[Ruby 1.9 - Bug #4902] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08* io.c (rb_io_close): close(2) on a fd which is being read bynobu
another thread causes deadlock on Mac OS X 10.5 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-03* include/ruby/intern.h, thread_pthread.c (rb_reserved_fd_p,ko1
RB_RESERVED_FD_P): added. This C API is to limit to access fds which are used by RubyVM internal. In this version of CRuby, return 1 if fd is communication pipe. If your application needs to close all file descriptors to preent resource leak, skip internal fds using this C API. We also define a macro RB_RESERVED_FD_P(fd). So you can write #ifndef RB_RESERVED_FD_P #define RB_RESERVED_FD_P(fd) 0 #endif for Ruby 1.9.2 or previous version to write compatible extensions. See [ruby-core:37727] * thread_win32.c (rb_reserved_fd_p): added (return 0 for any fds). * io.c (rb_io_initialize): raise ArgumentError if given fd is reserved by Ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29 * math.c: Attach documentation for Math.drbrain
* object.c: Document NIL, TRUE, FALSE. * io.c: Improve grammar in ARGF comment. Document STDIN/OUT/ERR. Document ARGF global constant. * lib/rake: Hide deprecated toplevel constants from RDoc (import from rake trunk). * lib/thwait.rb: Document ThWait. * lib/mathn.rb: Hide Math redefinition from RDoc * lib/sync.rb: Add a basic comment for Sync_m, Synchronizer_m, Sync, Synchronizer. * parse.y: Document SCRIPT_LINES__. * hash.c: Document ENV class and global constant. * vm.c: Document TOPLEVEL_BINDING. * version.c: Document RUBY_* constants. * ruby.c: Document DATA and ARGV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* io.c (fill_cbuf): finish reading at EOF, and the readconv hasnobu
been cleared by another thread while io_fillbuf() is waiting at select(). a patch in [ruby-core:37197] by Hiroshi Shirosaki <h.shirosaki AT gmail.com>. fixed #3840 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* io.c: supress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* internal.h: declare internal functions here.akr
* node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 * io.c: Improve documentation of IO and File open and new.drbrain
Patch by Roger Pack. [Ruby 1.9 - Bug #4790] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-12* io.c: use select() appropriately for sendfile().akr
Fixed by Eric Wong. [ruby-core:36150] (maygvl_copy_stream_wait_readwrite): removed. (nogvl_copy_stream_sendfile): use nogvl_copy_stream_wait_write and maygvl_copy_stream_wait_read instead of maygvl_copy_stream_wait_readwrite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11* io.c (io_getc): should be 7bit if ascii. fixes #4557nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-09* io.c: fix IO.copy_stream interrupt handling.akr
based on the patch by Eric Wong. [ruby-core:36156] * vm_core.h (rb_thread_call_with_gvl): don't declare here. * thread.c: include internal.h. (rb_thread_execute_interrupts): new function. * internal.h (rb_thread_execute_interrupts): declared. (rb_thread_call_with_gvl): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03* io.c (io_fflush): windows -- call fsync() only when the FD is tied tousa
file, because if the FD is pipe, it blocks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-02* io.c (rb_io_s_write, rb_io_s_binwrite): return!!!usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-02* io.c: Add File.write, File.binwrite. [Feature #1081] [ruby-core:21701]sorah
* test/ruby/test_io.rb: Test for File.write, File.binwrite. * NEWS: News for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-02* io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internalusa
flush. [ruby-core:36670] [Bug #4813] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01doco: p outputs newline regardless of record separatorryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31* io.c (io_encoding_set): should honor already set ecflags since itnobu
might be set by mode option. fixed #4804 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31no space inside parensnobu
* io.c: remove spaces before closing parens. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31* io.c (rb_io_s_pipe): potential bug. the mode of read IO is set asusa
DEFAULT_TEXTMODE in call of io_set_encoding(), and of write IO is also set as it in call of io_new_instance() via rb_protect(). so, if DEFAULT_TEXTMODE is not 0, we should check the result of extract_binmode() and avoid crush of default IO mode and the result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-27* io.c (fill_cbuf): return MORE_CHAR_SUSPENDED when cbuf is not empty.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-27* io.c (fill_cbuf): Fix test-all crash.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-27* io.c (validate_enc_binmode): do not clear textmode flag ifnobu
default. fixed #4732 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-27* io.c (fill_cbuf): finish reading at EOF.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-21* io.c (rb_io_extract_modeenc): accept combination hash andkosaki
File::Constants. (eg. File.open('yo', :mode => File::WRONLY)) [Feature #4742][ruby-core:36338] * test/ruby/test_io.rb (TestIO#test_open_mode): new test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19revert O_CLOEXEC patch series completely.kosaki
because boron chkbuild test result says, An old linux kernel ignore O_CLOEXEC silently instead of return an error. It may lead to bring new security risk. So, we have to be pending it until finish to implement proper fallback logic. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e