summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-31 00:13:03 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-31 00:13:03 +0000
commitd500908417d88291a649a46de2766c3aa8dcf82d (patch)
tree2ca41a83ef3b9c2621b3f9a8753b7a47e5b74e14 /io.c
parent3cefaf62788ca8eda1747c0db7dfcd350b6978f2 (diff)
merges r31747 and r31758 from trunk into ruby_1_9_2.
-- * io.c (fill_cbuf): finish reading at EOF. -- * io.c (fill_cbuf): return MORE_CHAR_SUSPENDED when cbuf is not empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/io.c b/io.c
index 744da5c4bb..f99bc30f58 100644
--- a/io.c
+++ b/io.c
@@ -1694,10 +1694,15 @@ fill_cbuf(rb_io_t *fptr, int ec_flags)
res = rb_econv_convert(fptr->readconv, NULL, NULL, &dp, de, 0);
fptr->cbuf_len += (int)(dp - ds);
rb_econv_check_error(fptr->readconv);
+ break;
}
}
}
}
+ if (cbuf_len0 != fptr->cbuf_len)
+ return MORE_CHAR_SUSPENDED;
+
+ return MORE_CHAR_FINISHED;
}
static VALUE