Skip to content
This repository was archived by the owner on Jun 20, 2018. It is now read-only.

Commit a79df06

Browse files
committed
Fix latest crystal compatibility
1 parent 7059f2c commit a79df06

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/have_files.cr

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ module HaveFiles
2121
def self.rm_r(path)
2222
if Dir.exists?(path) && !File.symlink?(path)
2323
Dir.open(path) do |dir|
24-
dir.each do |entry|
25-
if entry != "." && entry != ".."
26-
src = File.join(path, entry)
27-
rm_r(src)
28-
end
24+
dir.each_child do |entry|
25+
src = File.join(path, entry)
26+
rm_r(src)
2927
end
3028
end
3129
Dir.rmdir(path)

0 commit comments

Comments
 (0)