summaryrefslogtreecommitdiff
path: root/ext/stringio/stringio.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-14 13:52:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-14 13:52:41 +0000
commit1a155ee7f697f8dd791bda46afc2be2ebe806207 (patch)
tree43410232ca9d823d90f011af6fba68583442cdb8 /ext/stringio/stringio.c
parent1df1cb307ee5dbd8096e3d284f98a8358f5adce3 (diff)
* ext/stringio/stringio.c (strio_sysread): should not raise at empty
read. a patch from Arthur Schreiber at [ruby-core:17245]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio/stringio.c')
-rw-r--r--ext/stringio/stringio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 604ea87800..8b5abb3f62 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;