File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -494,12 +494,16 @@ describe "Dir" do
494494
495495 it " ignores hidden files" do
496496 Dir .glob(" #{ Path [datapath].to_posix} /dir/dots/*" , match: :none ).should be_empty
497+ Dir .glob(" #{ Path [datapath].to_posix} /dir/dots/*/" , match: :none ).should be_empty
497498 Dir .glob(" #{ Path [datapath].to_posix} /dir/dots/*" , match_hidden: false ).should be_empty
499+ Dir .glob(" #{ Path [datapath].to_posix} /dir/dots/*/" , match_hidden: false ).should be_empty
498500 end
499501
500502 it " ignores hidden files recursively" do
501503 Dir .glob(" #{ Path [datapath].to_posix} /dir/dots/**/*" , match: :none ).should be_empty
504+ Dir .glob(" #{ Path [datapath].to_posix} /dir/dots/**/*/" , match: :none ).should be_empty
502505 Dir .glob(" #{ Path [datapath].to_posix} /dir/dots/**/*" , match_hidden: false ).should be_empty
506+ Dir .glob(" #{ Path [datapath].to_posix} /dir/dots/**/*/" , match_hidden: false ).should be_empty
503507 end
504508 end
505509
Original file line number Diff line number Diff line change @@ -282,6 +282,7 @@ class Dir
282282 next_cmd = sequence[next_pos]?
283283
284284 each_child(path) do |entry |
285+ next unless matches_file?(entry, match)
285286 if cmd.matches?(entry.name)
286287 is_dir = entry.dir?
287288 fullpath = join(path, entry.name)
You can’t perform that action at this time.
0 commit comments