diff options
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -5319,7 +5319,7 @@ io_strip_bom(VALUE io) case INT2FIX(0xFE): if (NIL_P(b2 = rb_io_getbyte(io))) break; if (b2 == INT2FIX(0xFF)) { - return rb_enc_find_index("UTF-16BE"); + return ENCINDEX_UTF_16BE; } rb_io_ungetbyte(io, b2); break; @@ -5330,14 +5330,14 @@ io_strip_bom(VALUE io) b3 = rb_io_getbyte(io); if (b3 == INT2FIX(0) && !NIL_P(b4 = rb_io_getbyte(io))) { if (b4 == INT2FIX(0)) { - return rb_enc_find_index("UTF-32LE"); + return ENCINDEX_UTF_32LE; } rb_io_ungetbyte(io, b4); rb_io_ungetbyte(io, b3); } else { rb_io_ungetbyte(io, b3); - return rb_enc_find_index("UTF-16LE"); + return ENCINDEX_UTF_16LE; } } rb_io_ungetbyte(io, b2); @@ -5348,7 +5348,7 @@ io_strip_bom(VALUE io) if (b2 == INT2FIX(0) && !NIL_P(b3 = rb_io_getbyte(io))) { if (b3 == INT2FIX(0xFE) && !NIL_P(b4 = rb_io_getbyte(io))) { if (b4 == INT2FIX(0xFF)) { - return rb_enc_find_index("UTF-32BE"); + return ENCINDEX_UTF_32BE; } rb_io_ungetbyte(io, b4); } |