summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
AgeCommit message (Collapse)Author
2009-05-14* ext/stringio/stringio.c (strio_ungetbyte): encoding should notnobu
be effective. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23424 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-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 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-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-01-31add a test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31* io.c (copy_stream_body): don't check to_io becauseakr
Zlib::GzipWriter#to_io returns the underlying IO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c (pipe_close): removed.akr
(pipe_yield): defined. (rb_io_s_pipe): use pipe_yield. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c (flush_before_seek): check io_fflush result.akr
(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/trunk@20989 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-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-11* test/ruby/test_io.rb (test_dup_many): extracted from test_dup.akr
test in ruby subprocess. at asakusa.rb. [ruby-dev:35648] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28* test/ruby/test_io.rb (test_sysopen): should specify the mode of IO::for_fdusa
if F_GETFL is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28* test/ruby/test_io.rb (test_copy_stream, test_copy_stream_socket): skip someusa
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19992 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* test/ruby/envutil.rb: reverted the changeset 19948 because ityugui
concealed unexpected behaviours of ruby. * test/ruby/test_io.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26* test/ruby/envutil.rb (assert_in_out_err): disables builtin rubygemsnobu
to get rid of the interference. * test/ruby/test_io.rb (ruby): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17* test/ruby/test_io.rb (TestIO#test_dup): avoid infinite loop.kazu
[ruby-dev:36326] * test/ruby/test_io.rb (TestIO#test_dup): remove needless open. [ruby-dev:35957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16* test/ruby/test_io.rb (TestIO#test_dup): exception should bematz
raised from IO#dup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15* test/ruby/test_io.rb (TestIO#test_dup): this test might fail ifmatz
there are any garbage IO objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-08* test/ruby/test_io.rb (TestIO#test_dup): add open in block.kazu
see [ruby-dev:35957]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27* io.c (rb_io_initialize): don't accept IO object. [ruby-dev:35895]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25* test/ruby/test_io.rb (test_dup): fix typo. see [ruby-dev:35958]mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21test O_NOFOLLOW only on FreeBSD and Linux.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20* io.c (open_key_args): IO.foreach(path, rs, limit) didn't work.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20* io.c (rb_io_open_with_args): use rb_open_file instead of rb_io_open.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-19mkcdtmpdir doesn't yield a value.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-17* io.c (prepare_getline_args): io.gets(10,nil) should cause TypeError.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-29* test/ruby/test_io.rb (pipe): run reader thread and writer thread.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-15* test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err): newmame
method. * test/ruby/test_argf.rb: use assert_in_out_err instead of EnvUtil.rubyexec. * test/ruby/test_module.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_objectspace.rb: ditto. * test/ruby/test_object.rb: ditto. * test/ruby/test_string.rb: ditto. * test/ruby/test_method.rb: ditto. * test/ruby/test_variable.rb: ditto. * test/ruby/test_io.rb: ditto. * test/ruby/test_rubyoptions.rb: ditto. * test/ruby/test_exception.rb: ditto. * test/ruby/test_class.rb: ditto. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-18* test/ruby/test_io.rb (test_copy_stream_dst_rbuf): set binmode.usa
* test/ruby/test_io.rb (make_tempfile): set binmode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-11* io.c (rb_io_reopen): clear read buffer.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02* re.c: fix SEGV by Regexp.allocate.names, Match.allocate.names, etc.mame
* test/ruby/test_regexp.rb: add tests for above. * io.c: fix SEGV by IO.allocate.print, etc. * test/ruby/test_io.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-30* test/ruby/test_argf.rb: rename a conflicting method name.mame
* test/ruby/test_string.rb: ditto. * test/ruby/test_io.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-29* test/ruby/test_argf.rb: new tests for ARGF, to achieve over 85% testmame
coverage of file.c. * test/ruby/test_io.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21* io.c (copy_stream_body): call rb_io_check_readable andakr
rb_io_check_writable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20fix deadlock.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* io.c (copy_stream_rbuf_to_dst): removed.akr
(copy_stream_fallback_body): don't bypass write method. (copy_stream_body): simplified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* io.c (copy_stream_fallback): write directly (bypassing write method)akr
if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* io.c (copy_stream_fallback): read directly (bypassing readpartial)akr
if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-19* io.c (copy_stream_body): use readpartial and write method forakr
non-IOs such as StringIO and ARGF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-30* io.c: IO.copy_stream implemented. [ruby-dev:33843]akr
* thread.c (rb_fd_select): new function. * configure.in (sys/sendfile.h): check the header file. (sendfile): check the function. (pread): check the function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-20 * io.c (open_key_args): set arg->io even if no options passed.usa
[ruby-dev:33072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-10make a test locale independent.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* string.c (rb_str_comparable): fixed to keep transitivity.matz
[ruby-dev:32693] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18use ML ref. for assertion message.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-26* bootstraptest/test_knownbug.rb: move fixed tests.ko1
* bootstraptest/test_method.rb: ditto. * test/ruby/test_io.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-14* test/ruby/test_io.rb: tests which cause SEGV should not beko1
added. * bootstraptest/test_knownbug.rb: add above test to known bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-08add test for [ruby-dev:31650] and [ruby-dev:31659].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-20* test/ruby/test_io.rb (test_gets_rs): add more tests.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e