Age | Commit message (Collapse) | Author |
|
--
* io.c (pipe_open): handles leaked on win32 when an error occurs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (rb_io_ext_int_to_encs): Set external encoding if
ext==intern. [ruby-dev:38278]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (argf_rewind): need to rewind $. and ARGF.lineno.
[ruby-core:24046]
* io.c (struct argf): refactoring on $. and ARGF.lineno behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (argf_binmode_m): should call rb_io_ascii8bit_binmode() to
set its encoding to ASCII-8BIT. [ruby-core:24029]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (fptr_finalize): skip close(2) for fd 0,1,2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (argf_skip): should close only when current_file is available.
--
* test/ruby/test_argf.rb (TestArgf#test_skip): updated test
according to clarified behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (argf_each_line): should return self. [ruby-core:23852]
* io.c (argf_each_byte, argf_each_char): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (io_reopen): keeps pathv for prep_stdio. [ruby-dev:38131]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (copy_stream_fallback_body): off_t may be larger than long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
--
* io.c (rb_io_getline_1): enables limit even if rs is given.
[ruby-core:22434]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (io_encoding_set): ignore second argument when external and
internal are same. [ruby-dev:37939]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_s_binread): ensures file path. [ruby-dev:37940]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (io_fread): use rb_io_wait_readable for retry
avoid Errno::EINTR on ruby -e 'trap(:CHLD) {}; spawn("sleep 1"); STDIN.read'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_ungetbyte, rb_io_ungetc): clears EOF flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* include/ruby/io.h (FMODE_EOF): EOF flag on TTY.
* io.c (io_set_eof): sets EOF flag for TTY.
* io.c (io_seek): clears EOF flag.
* io.c (io_fillbuf): returns EOF if already met EOF. [ruby-dev:37798]
* io.c (io_fillbuf, io_fread, io_getpartial): sets EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_wait_readable, rb_io_wait_writable): need rb_fd_ptr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (appendline): reformed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_close_read): call rb_io_fptr_cleanup() instead of
fptr_finalize() because the fptr has special finalizser if it is a
pipe. [ruby-dev:37757] (3)
* io.c (io_reopen, rb_io_init_copy): should register fptr to
pipe_list when copying pipe fptr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686]
(also see [ruby-dev:37721])
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (maygvl_copy_stream_wait_read): renamed to add prefix to
express GVL state.
(nogvl_copy_stream_wait_write): ditto.
(nogvl_copy_stream_sendfile): ditto.
(maygvl_copy_stream_read): ditto.
(nogvl_copy_stream_write): ditto.
(nogvl_copy_stream_read_write): ditto.
(nogvl_copy_stream_func): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (copy_stream_body): don't check to_io because
Zlib::GzipWriter#to_io returns the underlying IO.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (fptr_finalize): don't allocate objects if noraise.
(finish_writeconv): add noalloc argument to be able to avoid
object allocation.
(finish_writeconv_arg): introduced again.
(finish_writeconv_sync): follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (fptr_finalize): close the IO object even if finish_writeconv or
flush is failed.
(finish_writeconv): don't raise. return errno or exception.
(finish_writeconv_arg): removed.
(finish_writeconv_sync): follow finish_writeconv change.
* transcode.c (rb_econv_make_exception): new function.
* include/ruby/encoding.h (rb_econv_make_exception): declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_initialize): check fd validity. [ruby-dev:36646]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (flush_before_seek): check io_fflush result.
(rb_io_check_readable): ditto.
(rb_io_flush): ditto.
(rb_io_fsync): ditto.
(remain_size): ditto.
(rb_io_write_nonblock): ditto.
(finish_writeconv): ditto.
(fptr_finalize): ditto.
(io_reopen): ditto.
(rb_io_reopen): ditto.
(copy_stream_body): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (io_fflush): flush write buffer without write lock in
finalizers. [ruby-dev:37572]
* io.c (rb_io_fptr_finalize): clear write lock before finalizing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (fptr_finalize): close the IO object even if close(2) is failed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_flush): fsync() after buffer is flushed on win32.
[ruby-core:20043]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_init_copy): call io_seek only if io_tell succeeds.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c: rdoc for File::open and 1.9 feature in file modes.
* transcode.c: rdoc for String#encode
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (pipe_open): need to initialize args.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* dln.c (dln_find_1): supplements an extension for executable
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/branches/ruby_1_9_1@20899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* win32/win32.c (rb_w32_read): ERROR_BROKEN_PIPE is not a real error
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/branches/ruby_1_9_1@20897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_extract_encoding_option): "internal_encoding: nil"
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/branches/ruby_1_9_1@20886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (io_binwrite): arg.offset should be updated after retry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_getc, rb_io_readchar): documentation correction from
Emiel van de Laar. [ruby-core:20212]
* ext/stringio/stringio.c (strio_ungetbyte): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* include/ruby/io.h (rb_io_t): added write_lock to serialize.
[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/branches/ruby_1_9_1@20192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_rewind): should reset fptr->readconv if it's
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/branches/ruby_1_9_1@20058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (extract_binmode): new function to extract binmode/textmode
options from hash.
* io.c (rb_io_extract_modeenc): use above function.
* io.c (rb_io_s_pipe): recognize binmode/textmode options.
* io.c (make_readconv): now can specify the size of cbuf.
* io.c (read_all, appendline, io_getc, rb_io_ungetc): follow above
change.
* win32/win32.c (rb_w32_pipe_exec): internal fds should be always
binmode.
* test/ruby/test_file.rb (test_each_char_extended_file,
test_getbyte_extended_file): add tests.
* test/ruby/test_file.rb (test_*_extended_file): test in default/text/
binary mode.
* test/ruby/test_file.rb (test_para_gets_extended_file): output file
should be binmode.
* test/ruby/test_io.rb (test_copy_stream, test_copy_stream_socket): skip
some tests if there isn't IO#nonblock=.
* test/ruby/test_io.rb (test_close_on_exec): skip if there isn't
IO#close_on_exec=.
* test/ruby/test_io.rb (test_bytes, test_readbyte): depend on binmode.
* test/ruby/test_io.rb (test_sysopen): should specify the mode of
IO::for_fd if F_GETFL is not available.
* test/ruby/test_io_m17n.rb (test_getc_invalid3): should set binmode if
enc is not compatible with ASCII.
* test/ruby/test_require.rb (test_require_too_long_filename): too long
commandline may be rejected by OS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@19999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
see [ruby-dev:36937].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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
|
|
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
|
|
foreach_arg.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* 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
|
|
* 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
|