diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-12-16 18:31:10 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-12-16 09:40:01 +0000 |
commit | bf0f3239071a9fa11dc1b9553106eb37c89f384c (patch) | |
tree | 972e8f727f066ce5efe229a6b468bb6ae64fa2e0 /lib/tmpdir.rb | |
parent | eef4e8a2c89f6c15096a43ea6783aa7994f1d0ca (diff) |
[ruby/tmpdir] Fix for path-like objects
Fix https://github.com/ruby/tmpdir/pull/37
https://github.com/ruby/tmpdir/commit/a8ceafae7d
Diffstat (limited to 'lib/tmpdir.rb')
-rw-r--r-- | lib/tmpdir.rb | 2 |
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() |