ruby-changes:13228
From: nobu <ko1@a...>
Date: Fri, 18 Sep 2009 06:52:23 +0900 (JST)
Subject: [ruby-changes:13228] Ruby:r24985 (trunk): * dir.c (push_glob): str should be a string always.
nobu 2009-09-18 06:47:14 +0900 (Fri, 18 Sep 2009) New Revision: 24985 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24985 Log: * dir.c (push_glob): str should be a string always. * dir.c (rb_push_glob, dir_globs): use #to_path to convert non- string values. cf. [ruby-dev:39345] Modified files: trunk/ChangeLog trunk/dir.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24984) +++ ChangeLog (revision 24985) @@ -1,3 +1,10 @@ +Fri Sep 18 06:47:13 2009 Nobuyoshi Nakada <nobu@r...> + + * dir.c (push_glob): str should be a string always. + + * dir.c (rb_push_glob, dir_globs): use #to_path to convert non- + string values. cf. [ruby-dev:39345] + Fri Sep 18 06:36:51 2009 Nobuyoshi Nakada <nobu@r...> * lib/mkmf.rb (rm_f, rm_rf): FileUtils.rm can take an array. Index: dir.c =================================================================== --- dir.c (revision 24984) +++ dir.c (revision 24985) @@ -1613,7 +1613,7 @@ args.value = ary; args.enc = enc; - return ruby_brace_glob0(StringValuePtr(str), flags | GLOB_VERBOSE, + return ruby_brace_glob0(RSTRING_PTR(str), flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args, enc); } @@ -1623,7 +1623,7 @@ long offset = 0; VALUE ary; - StringValue(str); + FilePathValue(str); ary = rb_ary_new(); while (offset < RSTRING_LEN(str)) { @@ -1653,7 +1653,7 @@ for (i = 0; i < argc; ++i) { int status; VALUE str = argv[i]; - SafeStringValue(str); + FilePathValue(str); status = push_glob(ary, str, flags); if (status) GLOB_JUMP_TAG(status); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/