aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-03 20:34:58 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-03 20:34:58 +0000
commit8ac9b7c2ed7b0da6b7c9380e9977fda46c6d24f8 (patch)
tree53999c68778606db15e910566e2cd1e96a177bd4 /io.c
parent10a0d4b61dd575be73c2e2b6223f1bf7d34c63ea (diff)
downloadruby-8ac9b7c2ed7b0da6b7c9380e9977fda46c6d24f8.tar.gz
* io.c (open_key_args): use rb_io_open instead of rb_f_open.
[ruby-core:15746] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/io.c b/io.c
index 55959802a4..f6e8bfb5ce 100644
--- a/io.c
+++ b/io.c
@@ -5932,11 +5932,7 @@ open_key_args(int argc, VALUE *argv, struct foreach_arg *arg)
}
v = rb_hash_aref(opt, mode);
if (!NIL_P(v)) {
- VALUE args[2];
-
- args[0] = argv[0];
- args[1] = v;
- arg->io = rb_f_open(2, args);
+ arg->io = rb_io_open(RSTRING_PTR(argv[0]), StringValueCStr(v));
}
if (!arg->io) {