diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-23 09:30:06 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-23 09:30:06 +0000 |
commit | cefcbd24f67258ec2dc1263fa987378f1971d429 (patch) | |
tree | 41e463d4a0c7333dbc89726a1cd51ee3448aa981 /io.c | |
parent | 2b78afebc731e3f9e447076c3cd2e53328b9e97a (diff) | |
download | ruby-cefcbd24f67258ec2dc1263fa987378f1971d429.tar.gz |
* io.c (rb_scan_open_args): use pop_last_hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -4602,12 +4602,7 @@ rb_scan_open_args(int argc, VALUE *argv, int modenum, flags; mode_t perm; - if (0 < argc) { - opt = rb_check_convert_type(argv[argc-1], T_HASH, "Hash", "to_hash"); - if (!NIL_P(opt)) { - argc -= 1; - } - } + opt = pop_last_hash(&argc, &argv); rb_scan_args(argc, argv, "12", &fname, &vmode, &vperm); #if defined _WIN32 || defined __APPLE__ |