summaryrefslogtreecommitdiff
path: root/lib/tmpdir.rb
diff options
context:
space:
mode:
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 a5f10fe9cb..967a011cf3 100644
--- a/lib/tmpdir.rb
+++ b/lib/tmpdir.rb
@@ -149,8 +149,8 @@ class Dir
# Generates and yields random names to create a temporary name
def create(basename, tmpdir=nil, max_try: nil, **opts)
- origdir = tmpdir
if tmpdir
+ origdir = tmpdir = File.path(tmpdir)
raise ArgumentError, "empty parent path" if tmpdir.empty?
else
tmpdir = tmpdir()