lib/goodcheck/glob.rb in goodcheck-1.7.1 vs lib/goodcheck/glob.rb in goodcheck-2.1.0
- old
+ new
@@ -9,7 +9,13 @@
end
def test(path)
path.fnmatch?(pattern, File::FNM_PATHNAME | File::FNM_EXTGLOB)
end
+
+ def ==(other)
+ other.is_a?(Glob) &&
+ other.pattern == pattern &&
+ other.encoding == encoding
+ end
end
end