aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index aa2d49a6b2..b16428e829 100644
--- a/io.c
+++ b/io.c
@@ -2822,7 +2822,8 @@ rb_io_each_codepoint(VALUE io)
}
}
if (MBCLEN_INVALID_P(r)) {
- rb_raise(rb_eArgError, "invalid byte sequence in %s", rb_enc_name(enc));
+ rb_raise(rb_eArgError, "invalid byte sequence in %s",
+ rb_enc_name(fptr->encs.enc));
}
n = MBCLEN_CHARFOUND_LEN(r);
c = rb_enc_codepoint(fptr->cbuf+fptr->cbuf_off,