1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
akr 2008-08-23 09:30:06 +00:00
parent 2b78afebc7
commit cefcbd24f6
2 changed files with 5 additions and 6 deletions

View file

@ -1,3 +1,7 @@
Sat Aug 23 18:29:29 2008 Tanaka Akira <akr@fsij.org>
* io.c (rb_scan_open_args): use pop_last_hash.
Sat Aug 23 16:59:42 2008 Tanaka Akira <akr@fsij.org>
* include/ruby/io.h (FMODE_INVALID_MASK): defined.

7
io.c
View file

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