[前][次][番号順一覧][スレッド一覧]

ruby-changes:33887

From: nobu <ko1@a...>
Date: Sat, 17 May 2014 10:40:38 +0900 (JST)
Subject: [ruby-changes:33887] nobu:r45968 (trunk): dir.c: set PLAIN for non-magical

nobu	2014-05-17 10:40:34 +0900 (Sat, 17 May 2014)

  New Revision: 45968

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45968

  Log:
    dir.c: set PLAIN for non-magical
    
    * dir.c (glob_make_pattern): set PLAIN for non-magical path to
      skip parts which not need to glob.
      [ruby-core:61552] [Bug #9648]

  Modified files:
    trunk/ChangeLog
    trunk/dir.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45967)
+++ ChangeLog	(revision 45968)
@@ -1,4 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Sat May 17 10:05:05 2014  Nobuyoshi Nakada  <nobu@r...>
+Sat May 17 10:40:33 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* dir.c (glob_make_pattern): set PLAIN for non-magical path to
+	  skip parts which not need to glob.
+	  [ruby-core:61552] [Bug #9648]
 
 	* dir.c (has_magic): return ALPHA at alphabetical name regardless
 	  FNM_CASEFOLD flag.
Index: dir.c
===================================================================
--- dir.c	(revision 45967)
+++ dir.c	(revision 45968)
@@ -1229,7 +1229,7 @@ glob_make_pattern(const char *p, const c https://github.com/ruby/ruby/blob/trunk/dir.c#L1229
 	    }
 	    memcpy(buf, p, m-p);
 	    buf[m-p] = '\0';
-	    tmp->type = magic > MAGICAL ? MAGICAL : magic;
+	    tmp->type = magic > MAGICAL ? MAGICAL : magic > non_magic ? magic : PLAIN;
 	    tmp->str = buf;
 	    if (*m) {
 		dirsep = 1;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]