diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-09 02:35:38 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-09 02:35:38 +0000 |
| commit | 3882ef95ea6c89122b7293986a2b1664cdcd99c4 (patch) | |
| tree | f1e2c6527ecbc8672484f2dd334af18ff425ed90 | |
| parent | d4823cbfa340e765f673239f1cad97cdc2063590 (diff) | |
| download | ruby-3882ef95ea6c89122b7293986a2b1664cdcd99c4.tar.gz ruby-3882ef95ea6c89122b7293986a2b1664cdcd99c4.tar.xz ruby-3882ef95ea6c89122b7293986a2b1664cdcd99c4.zip | |
* io.c (io_encoding_set): ignore second argument when external and
internal are same. [ruby-dev:37939]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | io.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Mon Feb 9 11:31:09 2009 NARUSE, Yui <naruse@ruby-lang.org> + + * io.c (io_encoding_set): ignore second argument when external and + internal are same. [ruby-dev:37939] + Mon Feb 9 09:05:12 2009 Tanaka Akira <akr@fsij.org> * ext/socket/option.c (inspect_local_peercred): check version. @@ -7024,6 +7024,10 @@ io_encoding_set(rb_io_t *fptr, VALUE v1, VALUE v2, VALUE opt) } else enc = rb_to_encoding(v2); + if (enc == enc2) { + /* Special case - "-" => no transcoding */ + enc2 = NULL; + } } else enc = rb_to_encoding(v2); |
