diff --git a/lib/dir_init.rb b/lib/dir_init.rb --- a/lib/dir_init.rb +++ b/lib/dir_init.rb @@ -57,6 +57,7 @@ ensure # make sure it unlock the directory dir.flock(File::LOCK_UN) + dir.close end end @@ -94,6 +95,7 @@ ensure # make sure it unlock the directory dir.flock(File::LOCK_UN) + dir.close end end