diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-13 06:13:10 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-13 06:13:10 +0000 |
| commit | b77f3c6d2bebe7e313fdd5aba34c525d56f46680 (patch) | |
| tree | 50dad966b84bc2082a8d32783b8ede460a5e1a39 /io.c | |
| parent | ce1106a1711e45d46093681702ff95e7e484f6cf (diff) | |
merges r23976 from trunk into ruby_1_9_1.
--
* io.c (rb_io_ext_int_to_encs): Set external encoding if
ext==intern. [ruby-dev:38278]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@24071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3868,7 +3868,7 @@ rb_io_ext_int_to_encs(rb_encoding *ext, rb_encoding *intern, rb_encoding **enc, intern = rb_default_internal_encoding(); if (intern == NULL || intern == (rb_encoding *)Qnil || intern == ext) { /* No internal encoding => use external + no transcoding */ - *enc = default_ext ? NULL : ext; + *enc = (default_ext && intern != ext) ? NULL : ext; *enc2 = NULL; } else { |
