summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
AgeCommit message (Collapse)Author
2013-05-11disable test_fcntl_lock_linux on x32.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-20* test/csv/test_features.rb, test/logger/test_logger.rbakr
test/mkmf/test_have_macro.rb, test/net/http/test_http.rb, test/openssl/test_config.rb, test/psych/test_encoding.rb, test/psych/test_exception.rb, test/psych/test_psych.rb, test/psych/test_tainted.rb, test/readline/test_readline.rb, test/rexml/test_contrib.rb, test/ruby/test_autoload.rb, test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb, test/ruby/test_file.rb, test/ruby/test_io.rb, test/ruby/test_marshal.rb, test/ruby/test_process.rb, test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb, test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb, test/zlib/test_zlib.rb: Use Tempfile.create. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03* io.c (rb_io_seek_m): Accept :CUR, :END, :SET as "whence" argument.akr
(interpret_seek_whence): New function. [ruby-dev:45818] [Feature #6643] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-30* test/ruby/test_class.rb: Simplify warning checksmarcandre
* test/ruby/test_io.rb: ditto * test/ruby/test_module.rb: ditto * test/ruby/test_regexp.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* thread.c: disabled _FORTIFY_SOURCE for avoid to hit glibc bug.kosaki
[Bug #8080] [ruby-core:53349] * test/ruby/test_io.rb (TestIO#test_io_select_with_many_files): test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-25* test/ruby/test_io.rb (test_ioctl_linux): skip if a platform iskosaki
not x86 because linux ioctl request number depend on cpu arch. At least, alpha, mips, sparc and ppc have a different number. [Bug #7718] [ruby-core:51544] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22Deprecate #{lines,bytes,chars,codepoints} of IO-likes.knu
* io.c (rb_io_lines, rb_io_bytes, rb_io_chars, rb_io_codepoints): Deprecate IO#{lines,bytes,chars,codepoints} and those of ARGF. [Feature #6670] * ext/stringio/stringio.c (strio_lines, strio_bytes, strio_chars) (strio_codepoints): Deprecate StringIO#{lines,bytes,chars,codepoints}. [Feature #6670] * ext/zlib/zlib.c (rb_gzreader_lines, rb_gzreader_bytes): Deprecate Zlib::GzipReader#{lines,bytes}. [Feature #6670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01io.c: recurse for the argumentnobu
* io.c (rb_io_puts): recurse for the argument itself, not converted array elements. [ruby-core:42444] [Bug #5986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* ruby.c (load_file_internal): set default source encoding asnaruse
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12use tty(1) to check if /dev/tty is usable or notnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12Fix wrong condition of skipping test_ioctl_linuxnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03io.c: improved IO#reopennobu
* io.c (rb_io_reopen): improvement to accept optional arguments. a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806]. [Feature #7103] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28io.c: IO#reopen int modenobu
* io.c (rb_io_reopen): accept File::Constants as well as mode string. based on the patch by Glass_saga (Masaki Matsushita) in [ruby-core:47694]. [Feature #7067] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-16io.c: io_set_read_lengthnobu
* io.c (io_set_read_length): if the read length equals to the buffer string size then nothing to do. or ensure the string modifiable before setting the length only when the former is shorter. based on the patch in [ruby-core:47541] by Hiroshi Shirosaki. [ruby-core:46586] [Bug #6764] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-09* test/ruby/test_io.rb (test_advise_pipe): new test to checkkosaki
io.advise() against anonymous io object don't make crash. made by Eric Wong. [Bug #6081] [ruby-core:42880] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19* test/ruby/test_io.rb: remove temporally files early.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-25add tests for IO#seek.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-05Split one big test to seven tests.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13* test/ruby/test_io.rb (test_flush_in_finalizer1): don't use IO.for_fdnagachika
to close IO objects. it create IO object with already closed fd, and cause occasional Errno::EBADF in following tests. [ruby-core:45020] [Bug #6228] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13* test/ruby/test_io.rb (TestIO): revert r35631. it broke the intent ofnagachika
test_flush_in_finalizer1. [ruby-core:43951] [Bug ##6228] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-12* test/ruby/test_io.rb (class TestIO): Disable GC during IO tests toluislavena
avoid file descriptors being GC'ed. Suggestion by Tomoyuki Chikanaga [ruby-core:43951][Bug #6228] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-19Fix multithread issue in the test of r35391naruse
pipe() uses threads and its reader thread may work before the writer writes "foob". On such case, the reader will raise error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18* io.c (io_readpartial): Document the output buffer parameter isdrbrain
overwritten with the read contents even when non-empty. Patch by yu nobuoka. [ruby-trunk - Bug #6285] * io.c (io_read_nonblock): ditto. * io.c (io_read): ditto. * io.c (rb_io_sysread): ditto. * io.c (argf_read): ditto. * io.c (argf_readpartial): ditto. * ext/stringio/stringio.c (strio_read): ditto. * test/ruby/test_argf.rb (class TestArgf): Add test for existing behavior of read outbuf. * test/ruby/test_io.rb (class TestIO): ditto. * test/stringio/test_stringio.rb (class TestStringIO): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-08Decrease the default level of try_fdopen.naruse
Because it cause Bus Error: http://u32.rubyci.org/~chkbuild/ruby-trunk/log/20120407T230202Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-23* test/ruby/test_io.rb (try_fdopen): more GCable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22* test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated.usa
see [ruby-core:43550] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-21* test/ruby/test_io.rb (TestIO#test_pos_with_getc): added.usa
see [Bug #6179][ruby-core:43518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-09Rescue even if it test_readpartial_locktmp RuntimeError. [Bug#6099]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-29* test/ruby/test_io.rb (TestIO#test_readpartial_locktmp): skip onusa
windows because of the platform restriction. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-28* io.c (io_fread, io_getpartial, rb_io_sysread): set buffer sizenobu
after check if readable, which can cause thread switch. [ruby-dev:45297][Bug #6099] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-27forgotten to commit at r34834.usa
* test/ruby/test_io.rb (TestIO#test_setpos): use binmode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22* io.c (rb_io_extract_modeenc): fail only if conflictingnobu
text/binary modes given explicitly. [ruby-dev:45268][Bug #6055] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22* io.c (rb_io_s_foreach): argument check before making Enumerator.nobu
[ruby-dev:31525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22* io.c (rb_io_s_foreach): return enumerator including kerwordnobu
arguments. [ruby-dev:45267][Bug #6054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15Add test for r34624.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-13* io.c (io_setstrbuf): defer resizing buffer string until data isnobu
read actually. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-18Suppress warnings.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09* test/ruby/test_io.rb (test_autoclose_true_closed_by_finalizer,nagachika
test_autoclose_true_closed_by_finalizer): skip if IO objects are not recycled yet. [ruby-dev:45098] [Bug #5850] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-26* test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn'tusa
accept the block argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-27Run the test only if /dev/tty exists.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-25* io.c (ioctl_narg_len, linux_iocparm_len): reinstantiate linuxkosaki
specific narg length calculation. * test/ruby/test_io.rb (test_ioctl_linux2): add new test for old and unstructured ioctl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-24* test/openssl/test_engine.rb: use IO#reopen to restore stderr.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-24add a test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-23* io.c (ioctl_narg_len): don't use _IOC_SIZE macro on Linux.naruse
On Linux some constants for ioctl(2) doesn't include the size of its return value and 16bit value; for example FIONREAD 0x541B. Moreover the manual, ioctl_list(2), says "Note that the size bits are very unreliable: in lots of cases they are wrong, either because of buggy macros using sizeof(sizeof(struct)), or because of legacy values." So we shouldn't use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-21* test/ruby/test_io.rb (test_fcntl_dupfd): there is no known platformakr
which don't have F_DUPFD. [ruby-dev:44874] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-21* test/ruby/test_io.rb (test_fcntl_dupfd): the argument of F_DUPFD isakr
minimum file descriptor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15* test/ruby/test_io.rb (TestIO#test_fcntl_dupfd): fix OpenBSD testkosaki
failure. [ruby-dev:44872] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14revert r33752 and fix test case based [ruby-dev:44866].ayumin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14* test/ruby/test_io.rb (test_fcntl_dupfd): fix test error onayumin
SnowLeopard. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-12* test/ruby/test_io.rb (test_fcntl_dupfd): skip if Fcntl::DUPFDkosaki
is not defined. Pointed out by CHIKANAGA Tomoyuki. Thanks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e