diff options
Diffstat (limited to 'lib/rubygems/util.rb')
-rw-r--r-- | lib/rubygems/util.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/util.rb b/lib/rubygems/util.rb index b19e22aef9..15b5640de4 100644 --- a/lib/rubygems/util.rb +++ b/lib/rubygems/util.rb @@ -83,7 +83,11 @@ module Gem::Util here = File.expand_path directory loop do - Dir.chdir here, &block rescue Errno::EACCES + begin + Dir.chdir here, &block + rescue + Errno::EACCES + end new_here = File.expand_path("..", here) return if new_here == here # toplevel |