From 8ac9b7c2ed7b0da6b7c9380e9977fda46c6d24f8 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 3 Mar 2008 20:34:58 +0000 Subject: * 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 --- io.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'io.c') 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) { -- cgit v1.2.3