diff --git a/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb b/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb index 5cacfcf05f56..a00496687cc1 100644 --- a/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +++ b/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb @@ -13,14 +13,14 @@ class Bundler::Dir < Dir - @@systmpdir ||= defined?(Etc.systmpdir) ? Etc.systmpdir : '/tmp' + @systmpdir ||= defined?(Etc.systmpdir) ? Etc.systmpdir : '/tmp' ## # Returns the operating system's temporary file path. def self.tmpdir tmp = nil - ['TMPDIR', 'TMP', 'TEMP', ['system temporary path', @@systmpdir], ['/tmp']*2, ['.']*2].each do |name, dir = ENV[name]| + ['TMPDIR', 'TMP', 'TEMP', ['system temporary path', @systmpdir], ['/tmp']*2, ['.']*2].each do |name, dir = ENV[name]| next if !dir dir = File.expand_path(dir) stat = File.stat(dir) rescue next