Skip to content

Commit 30650cb

Browse files
committed
Remove Pathname
1 parent 8a2d406 commit 30650cb

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

lib/code_manifest/rule.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'pathname'
4-
53
module CodeManifest
64
class Rule
75
attr_reader :exclude, :glob
@@ -26,10 +24,9 @@ def initialize(root, pattern)
2624
end
2725

2826
def match?(file)
29-
file = Pathname.new(file)
30-
file = @root.join(file) unless file.absolute?
27+
file = File.join(@root, file) unless File.absolute_path?(file)
3128

32-
File.fnmatch?(glob, file.to_s, Manifest::GLOB_OPTIONS)
29+
File.fnmatch?(glob, file, Manifest::GLOB_OPTIONS)
3330
end
3431
end
3532
end

0 commit comments

Comments
 (0)