Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Untabify

  • Loading branch information...
commit 716166fcda5d5bda8379743c8ea7577937868ece 1 parent a30b68d
@nahi nahi authored
Showing with 11 additions and 11 deletions.
  1. +6 −6 lib/ruby/1.8/tmpdir.rb
  2. +5 −5 lib/ruby/1.9/tmpdir.rb
View
12 lib/ruby/1.8/tmpdir.rb
@@ -47,15 +47,15 @@ def Dir::tmpdir
# Opening directory is not allowed in Java.
dirs = [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'], ENV['USERPROFILE'], @@systmpdir, '/tmp', tmp]
for dir in dirs
- if dir and File.directory?(dir) and File.writable?(dir) and (File.stat(dir).mode & 0002) == 0
+ if dir and File.directory?(dir) and File.writable?(dir) and (File.stat(dir).mode & 0002) == 0
return File.expand_path(dir)
- end
+ end
end
for dir in dirs
- if dir and File.directory?(dir) and File.writable?(dir)
- tmp = dir
- break
- end
+ if dir and File.directory?(dir) and File.writable?(dir)
+ tmp = dir
+ break
+ end
end
File.expand_path(tmp)
end
View
10 lib/ruby/1.9/tmpdir.rb
@@ -28,15 +28,15 @@ def Dir::tmpdir
# Opening directory is not allowed in Java.
dirs = [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'], @@systmpdir, '/tmp', tmp]
for dir in dirs
- if dir and stat = File.stat(dir) and stat.directory? and stat.writable? and !stat.world_writable?
+ if dir and stat = File.stat(dir) and stat.directory? and stat.writable? and !stat.world_writable?
return File.expand_path(dir)
end
end
for dir in dirs
- if dir and stat = File.stat(dir) and stat.directory? and stat.writable?
- tmp = dir
- break
- end rescue nil
+ if dir and stat = File.stat(dir) and stat.directory? and stat.writable?
+ tmp = dir
+ break
+ end rescue nil
end
File.expand_path(tmp)
end
Please sign in to comment.
Something went wrong with that request. Please try again.