Commit Graph

7 Commits

Author SHA1 Message Date
nobu 6fe8d987ce * ext/stringio/stringio.c (strio_read): clear the buffer argument
when returning nil.  [ruby-dev:22363]

* test/ruby/ut_eof.rb (TestEOF::test_eof_0, TestEOF::test_eof_1):
  add buffer argument tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24 05:23:32 +00:00
matz 0a4fc3d71b * io.c (read_all): do not return nil at the end of file.
[ruby-dev:22334]

* io.c (argf_read): do not depend on nil at eof behavior of
  IO#read().

* eval.c (rb_thread_join): dup exception before re-raising it.

* io.c (rb_io_eof): call clearerr() to prevent side effect.  this
  patch is supplied by Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>.
  [ruby-dev:22234]

* pack.c (OFF16): get offset for big endian machines.

* pack.c (pack_pack): use OFF16 instead of OFF16B.
  [ruby-dev:22344]

* pack.c (pack_unpack): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-23 19:53:45 +00:00
nobu c5d4ee4a39 * ext/stringio/stringio.c (strio_read): set EOF flag at short read.
[ruby-dev:22223], [ruby-dev:22224]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-10 10:29:00 +00:00
nobu ba18b0c6cb * ext/stringio/stringio.c (strio_read): do not set EOF flag when
requested length is zero.  [ruby-dev:22214]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-10 08:54:56 +00:00
nobu 6395c3b38d * ext/stringio/stringio.c (strio_read): adjust behavior at reading
beyond EOF to IO.  [ruby-dev:22205]

* test/ruby/ut_eof.rb (TestEOF::Seek): test behaviors at reading
  beyond EOF.

* test/ruby/test_file.rb, * test/stringio/test_stringio.rb:
  include TestEOF::Seek test case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-10 08:16:14 +00:00
akr 75b3b1901c add test for previous change to io.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-09 05:33:32 +00:00
nobu 7fbf13f7f2 * ext/stringio/stringio.c (strio_read): follow IO#read.
* test/ruby/ut_eof.rb, test/ruby/test_file.rb, test/ruby/test_pipe.rb,
  test/stringio/test_stringio.rb: add EOF test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-05 02:54:48 +00:00