diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-18 09:23:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-18 09:23:07 +0000 |
commit | 0c15b3a2221ff156452a9979b70b3e36d7bad6c0 (patch) | |
tree | 7d30f382804d06cb1d60fd451193287f148c920f /ext/stringio | |
parent | 12eee69294f0692eb74b2daeb7dcf8e000491518 (diff) |
* test/stringio/test_stringio.rb: imported from [ruby-dev:21941].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio')
-rw-r--r-- | ext/stringio/stringio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index d6d5b7694a..0fb60069de 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -849,6 +849,9 @@ strio_read(argc, argv, self) ptr->flags |= STRIO_EOF; return Qnil; } + else if (ptr->flags & STRIO_EOF) { + return Qnil; + } break; } /* fall through */ @@ -856,6 +859,7 @@ strio_read(argc, argv, self) len = RSTRING(ptr->string)->len - ptr->pos; if (len == 0 && ptr->pos == RSTRING(ptr->string)->len) { if (ptr->flags & STRIO_EOF) return Qnil; + ptr->flags |= STRIO_EOF; } break; default: |