summaryrefslogtreecommitdiff
path: root/lib/tempfile.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-04 00:18:38 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-04 00:18:38 +0000
commit05c108cdba62545bb50616726f0b7261cb89ad4e (patch)
treefe832bc92dc43fa5422937f165d9632f5a977a9a /lib/tempfile.rb
parentb85a4eea558368f68070c69b6ee482a77266ad96 (diff)
* lib/tempfile.rb: provide default basename parameter.
[fix GH-523] Patch by @dissolved * test/test_tempfile.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r--lib/tempfile.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index 6444151..4715173 100644
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -122,7 +122,7 @@ class Tempfile < DelegateClass(File)
#
# If Tempfile.new cannot find a unique filename within a limited
# number of tries, then it will raise an exception.
- def initialize(basename, tmpdir=nil, mode: 0, **options)
+ def initialize(basename="", tmpdir=nil, mode: 0, **options)
if block_given?
warn "Tempfile.new doesn't call the given block."
end