ruby-changes:7273
From: akr <ko1@a...>
Date: Sat, 23 Aug 2008 18:30:28 +0900 (JST)
Subject: [ruby-changes:7273] Ruby:r18792 (trunk): * io.c (rb_scan_open_args): use pop_last_hash.
akr 2008-08-23 18:30:06 +0900 (Sat, 23 Aug 2008) New Revision: 18792 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18792 Log: * io.c (rb_scan_open_args): use pop_last_hash. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18791) +++ ChangeLog (revision 18792) @@ -1,3 +1,7 @@ +Sat Aug 23 18:29:29 2008 Tanaka Akira <akr@f...> + + * io.c (rb_scan_open_args): use pop_last_hash. + Sat Aug 23 16:59:42 2008 Tanaka Akira <akr@f...> * include/ruby/io.h (FMODE_INVALID_MASK): defined. Index: io.c =================================================================== --- io.c (revision 18791) +++ io.c (revision 18792) @@ -4602,12 +4602,7 @@ 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__ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/