diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-24 22:49:37 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-24 22:49:37 +0000 |
| commit | 405882bf4b8f709d3f1e796fd731038d37877bf7 (patch) | |
| tree | 5dd2d5ae3d262350b50f35c76e87548ec597d9d7 | |
| parent | 937457e6959c665f7661bd2176f48f0b5c88cebd (diff) | |
| download | ruby-405882bf4b8f709d3f1e796fd731038d37877bf7.tar.gz ruby-405882bf4b8f709d3f1e796fd731038d37877bf7.tar.xz ruby-405882bf4b8f709d3f1e796fd731038d37877bf7.zip | |
* io.c (rb_io_each_codepoint): uninitialized local variable enc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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, |
