summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--io.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 868c5e7cc3..744a2e285f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jul 10 23:10:11 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (io_strip_bom): ungetbyte third byte when UTF-16LE.
+
Fri Jul 10 23:04:16 2009 NARUSE, Yui <naruse@ruby-lang.org>
* io.c (io_strip_bom): Fix condition of second byte of
diff --git a/io.c b/io.c
index 78b87fc6ac..0961f34ce5 100644
--- a/io.c
+++ b/io.c
@@ -4564,6 +4564,7 @@ io_strip_bom(VALUE io)
rb_io_ungetbyte(io, INT2FIX(b4));
}
else {
+ rb_io_ungetbyte(io, INT2FIX(b3));
return rb_enc_find_index("UTF-16LE");
}
rb_io_ungetbyte(io, INT2FIX(b3));