summaryrefslogtreecommitdiff
path: root/io.c
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
commit161f0a16990d8025135bcca1af3c992bfc3cf68c (patch)
tree3a35eefdff7eb4cf18b168eec8a679b24a8234e5 /io.c
parentf188db310555c347544d29916dd4a270b8a7419c (diff)
io.c (io_strip_bom): ungetbyte third byte when UTF-16LE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
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));