diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-14 13:52:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-14 13:52:41 +0000 |
commit | 437ef6d8f1abfb0bbd0fe80c0a08e7d12e65a57d (patch) | |
tree | 43410232ca9d823d90f011af6fba68583442cdb8 | |
parent | 0a9897f6bd2383e1731c9c0bef124af78004ed03 (diff) | |
download | ruby-437ef6d8f1abfb0bbd0fe80c0a08e7d12e65a57d.tar.gz ruby-437ef6d8f1abfb0bbd0fe80c0a08e7d12e65a57d.tar.xz ruby-437ef6d8f1abfb0bbd0fe80c0a08e7d12e65a57d.zip |
* ext/stringio/stringio.c (strio_sysread): should not raise at empty
read. a patch from Arthur Schreiber at [ruby-core:17245].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/stringio/stringio.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sat Jun 14 22:52:35 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/stringio/stringio.c (strio_sysread): should not raise at empty + read. a patch from Arthur Schreiber at [ruby-core:17245]. + Sat Jun 14 16:55:46 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * file.c (file_expand_path): no need to expand root path which has no diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 604ea8780..8b5abb3f6 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -1152,7 +1152,7 @@ static VALUE strio_sysread(int argc, VALUE *argv, VALUE self) { VALUE val = strio_read(argc, argv, self); - if (NIL_P(val) || RSTRING_LEN(val) == 0) { + if (NIL_P(val)) { rb_eof_error(); } return val; |