* io.c (open_key_args): allow encoding key to take two encoding

names.  a patch from <rubikitch AT ruby-lang.org>.  [ruby-dev:33540]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-01-30 17:23:27 +00:00
parent dd7bcfc072
commit d7f5b291be
2 changed files with 6 additions and 1 deletions

View File

@ -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]

2
io.c
View File

@ -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;
}
}