summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-20 08:58:07 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-20 08:58:07 +0000
commit8b5c7d939d3e22b2728ca9f59c3ac3376b88618a (patch)
tree8277398d69b21d5cb99ff0d7e81a0e253e081c92 /lib
parent96fc3108b597dacbc83f40fc03f8f732d630cf25 (diff)
* lib/tmpdir.rb (Dir.mktmpdir): Accept nil again, as Ruby 2.1.
[ruby-core:66943] [Bug #10616] Fixed by Alex Slynko. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/tmpdir.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb
index f52d092..494725c 100644
--- a/lib/tmpdir.rb
+++ b/lib/tmpdir.rb
@@ -81,8 +81,8 @@ class Dir
# FileUtils.remove_entry dir
# end
#
- def Dir.mktmpdir(prefix_suffix="d", *rest)
- path = Tmpname.create(prefix_suffix, *rest) {|n| mkdir(n, 0700)}
+ def Dir.mktmpdir(prefix_suffix=nil, *rest)
+ path = Tmpname.create(prefix_suffix || "d", *rest) {|n| mkdir(n, 0700)}
if block_given?
begin
yield path