summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--io.c5
-rw-r--r--version.h2
3 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 610d34ce4b..e4ea439dac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat May 28 03:04:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (fill_cbuf): return MORE_CHAR_SUSPENDED when cbuf is not empty.
+
+Fri May 27 22:38:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (fill_cbuf): finish reading at EOF.
+
Fri May 27 11:31:51 2011 misfo <tedwardo2@gmail.com>
* lib/rexml/text.rb (REXML::Text#initialize): prevent an error
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
diff --git a/version.h b/version.h
index b67bfb8dd8..32378f2645 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 258
+#define RUBY_PATCHLEVEL 259
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1