aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tmpdir.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-12 12:40:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-12 12:40:51 +0000
commit6f8bce9eff15b527c87e1b13312db2fbf0b504f4 (patch)
treefcccd01968dcae2fdc28486734447a1918815e77 /lib/tmpdir.rb
parent0a577a1ce090c1661abfd74502e45aa13a488835 (diff)
downloadruby-6f8bce9eff15b527c87e1b13312db2fbf0b504f4.tar.gz
tmpdir.rb: not expand tilde
* lib/tmpdir.rb (Dir::Tmpname#create): deal with a prefix name which starts with tilde as a plain name, not expanding as home directory. [ruby-core:50793] [Bug #7547] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tmpdir.rb')
-rw-r--r--lib/tmpdir.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb
index 03c02fd788..18d4fb683d 100644
--- a/lib/tmpdir.rb
+++ b/lib/tmpdir.rb
@@ -138,7 +138,7 @@ class Dir
end
n = nil
begin
- path = File.expand_path(make_tmpname(basename, n), tmpdir)
+ path = File.join(tmpdir, make_tmpname(basename, n))
yield(path, n, *opts)
rescue Errno::EEXIST
n ||= 0