summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-10 14:21:13 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-10 14:21:13 +0000
commit1e2695bd9be4f379927d8e4474e09e1c98eea6b5 (patch)
tree3a35eefdff7eb4cf18b168eec8a679b24a8234e5
parent0b928205a47e00dc226fc5e3625375264fabee59 (diff)
downloadruby-1e2695bd9be4f379927d8e4474e09e1c98eea6b5.tar.gz
ruby-1e2695bd9be4f379927d8e4474e09e1c98eea6b5.tar.xz
ruby-1e2695bd9be4f379927d8e4474e09e1c98eea6b5.zip
io.c (io_strip_bom): ungetbyte third byte when UTF-16LE.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--io.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 868c5e7cc..744a2e285 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 78b87fc6a..0961f34ce 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));