aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-23 09:30:06 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-23 09:30:06 +0000
commitcefcbd24f67258ec2dc1263fa987378f1971d429 (patch)
tree41e463d4a0c7333dbc89726a1cd51ee3448aa981 /io.c
parent2b78afebc731e3f9e447076c3cd2e53328b9e97a (diff)
downloadruby-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.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/io.c b/io.c
index c05a0b8ac2..f1fbd6ec7c 100644
--- a/io.c
+++ b/io.c
@@ -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__