diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 09:48:57 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 09:48:57 +0000 |
| commit | 59c5bb7ea7c9a991fe63ff71953087ccc41c7861 (patch) | |
| tree | 21e538fb198aef91a8693cccceea96a8390419f3 | |
| parent | 0db129f6a638e32f7885aa53253d20aff465e7a3 (diff) | |
merges r22146 from trunk into ruby_1_9_1.
* 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/branches/ruby_1_9_1@22523 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] + Sun Feb 8 23:28:05 2009 Yusuke Endoh <mame@tsg.ne.jp> * include/ruby/st.h, st.c: order entries by a linked list instead of @@ -6969,6 +6969,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); |
