Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/common/file.rb
Original file line number Diff line number Diff line change
@@ -674,10 +674,7 @@ def self.fnmatch(pattern, path, flags=0)
flags = Rubinius::Type.coerce_to(flags, Fixnum, :to_int)

if (flags & FNM_EXTGLOB) != 0
patterns = braces(pattern, flags)
return false if patterns.empty?

patterns.any? { |p| super(p, path, flags) }
braces(pattern, flags).any? { |p| super(p, path, flags) }
else
super pattern, path, flags
end

0 comments on commit 5299123

Please sign in to comment.