diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | io.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Thu Jun 25 06:50:23 2009 Yukihiro Matsumoto <matz@ruby-lang.org> + + * io.c (rb_io_each_codepoint): uninitialized local variable enc. + Thu Jun 25 06:25:49 2009 Yukihiro Matsumoto <matz@ruby-lang.org> * enum.c (first_i): wrong condition for no argument #first. @@ -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, |