summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-13 09:20:42 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-13 09:20:42 +0000
commit8bc7d22fb19302f265e40d2a13ecd21d05abb78e (patch)
treee23b91aa1ff78fc5743e195330fb4cac98048929 /io.c
parentd6b1887dd33000a9c1d6a8c88449a0ef06eaa5d4 (diff)
merge from trunk (r27782)
* io.c (swallow): should use more_char() instead of fill_cbuf(). suggested by akr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/io.c b/io.c
index a2cda255d5..9d8d6445f8 100644
--- a/io.c
+++ b/io.c
@@ -2296,7 +2296,6 @@ swallow(rb_io_t *fptr, int term)
if (NEED_READCONV(fptr)) {
rb_encoding *enc = io_read_encoding(fptr);
int needconv = rb_enc_mbminlen(enc) != 1;
- VALUE v;
make_readconv(fptr, 0);
do {
size_t cnt;
@@ -2315,10 +2314,7 @@ swallow(rb_io_t *fptr, int term)
}
io_shift_cbuf(fptr, (int)cnt - i, NULL);
}
- v = fill_cbuf(fptr, 0);
- if (v != MORE_CHAR_SUSPENDED && v != MORE_CHAR_FINISHED)
- rb_exc_raise(v);
- } while (v == MORE_CHAR_SUSPENDED);
+ } while (more_char(fptr) != MORE_CHAR_FINISHED);
return FALSE;
}