diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 04:32:53 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 04:32:53 +0000 |
| commit | 9bc459b96fb5c4e518b131c32b798c27eb894de1 (patch) | |
| tree | 46e049599c7adf771e3a507613137aa9a1679751 /io.c | |
| parent | d8e8231c22e0c31e76a30ab86faf2723f9c6dd53 (diff) | |
| download | ruby-9bc459b96fb5c4e518b131c32b798c27eb894de1.tar.gz ruby-9bc459b96fb5c4e518b131c32b798c27eb894de1.tar.xz ruby-9bc459b96fb5c4e518b131c32b798c27eb894de1.zip | |
* io.c (rb_io_external_encoding): should fill delayed
initialization for STDIN.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -5671,6 +5671,9 @@ rb_io_external_encoding(VALUE io) rb_io_t *fptr; GetOpenFile(io, fptr); + if (!fptr->enc && fptr->fd == 0) { + fptr->enc = rb_default_external_encoding(); + } return rb_enc_from_encoding(fptr->enc); } |
