From f88481740a8f633ea02067baa00eaf94a29421fb Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 17 May 2014 01:40:34 +0000 Subject: 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 0184b1863a..064609c8d8 100644 --- a/dir.c +++ b/dir.c @@ -1229,7 +1229,7 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc) } 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; -- cgit v1.2.3