summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--io.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 503f3da47..077e75280 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jan 31 02:22:04 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * io.c (open_key_args): allow encoding key to take two encoding
+ names. a patch from <rubikitch AT ruby-lang.org>. [ruby-dev:33540]
+
Thu Jan 31 02:15:49 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (dsym): allow empty symbols. [ruby-core:15248]
diff --git a/io.c b/io.c
index 32a37df3c..749229e33 100644
--- a/io.c
+++ b/io.c
@@ -5853,7 +5853,7 @@ open_key_args(int argc, VALUE *argv, struct foreach_arg *arg)
arg->io = rb_io_open(RSTRING_PTR(argv[0]), "r");
GetOpenFile(arg->io, fptr);
- fptr->enc = rb_to_encoding(v);
+ mode_enc(fptr, StringValueCStr(v));
return;
}
}