From 6f8bce9eff15b527c87e1b13312db2fbf0b504f4 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 12 Dec 2012 12:40:51 +0000 Subject: 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 --- lib/tmpdir.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3