summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-24 22:49:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-24 22:49:37 +0000
commitbfcc8dbbd33651a99ec7a58b198e2b5efab893c6 (patch)
tree5dd2d5ae3d262350b50f35c76e87548ec597d9d7 /io.c
parent6abc3e1b41439a56916675893c9c2404e5288bcd (diff)
* io.c (rb_io_each_codepoint): uninitialized local variable enc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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,