diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-04 00:18:38 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-04 00:18:38 +0000 |
commit | 05c108cdba62545bb50616726f0b7261cb89ad4e (patch) | |
tree | fe832bc92dc43fa5422937f165d9632f5a977a9a /lib/tempfile.rb | |
parent | b85a4eea558368f68070c69b6ee482a77266ad96 (diff) | |
download | ruby-05c108cdba62545bb50616726f0b7261cb89ad4e.tar.gz |
* 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.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 64441511fe..47151732c3 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 |