Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tempfile.rb: provide default basename parameter #523

Closed
wants to merge 1 commit into from

Conversation

4 participants
@dissolved
Copy link

commented Jan 31, 2014

The basename parameter to Tempfile.new is mostly meaningless, as the
filename is made unique. An empty string default paremeter will still
give a valid unique filename, freeing the caller to not be concerned
with the filename at all.

@saturnflyer

This comment has been minimized.

Copy link

commented Jan 31, 2014

Awesome! The parameter has become a useless require config. Thanks for this!

@zzak

This comment has been minimized.

Copy link
Member

commented Feb 8, 2014

@dissolved Could you rebase this? Something messed up on our svn+git sync.

@dissolved

This comment has been minimized.

Copy link
Author

commented Feb 9, 2014

Done.

@ayumin

This comment has been minimized.

Copy link
Member

commented May 8, 2014

@dissolved, Thanks for your request. You should post this idea to bugs.ruby-lang.org.

Ryan Sandridge
tempfile.rb: provide default basename parameter
The basename parameter to Tempfile.new is mostly meaningless, as the
filename is made unique. An empty string default paremeter will still
give a valid unique filename, freeing the caller to not be concerned
with the filename at all.
@dissolved

This comment has been minimized.

Copy link
Author

commented May 17, 2014

It isn't really a bug though. Are feature requests sent to bugs.ruby-lang.org as well?

Anyway, just rebased again... Travis CI build is passing.

@sorah sorah force-pushed the ruby:trunk branch from 5317131 to 307198a Nov 26, 2014

@hsbt hsbt closed this in 05c108c Jan 4, 2015

ayumin pushed a commit to ayumin/ruby that referenced this pull request Jan 4, 2015

* lib/tempfile.rb: provide default basename parameter.
  [fix rubyGH-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

mmasaki pushed a commit to mmasaki/ruby that referenced this pull request May 30, 2015

* lib/tempfile.rb: provide default basename parameter.
  [fix rubyGH-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

hsbt pushed a commit that referenced this pull request Jan 27, 2016

Fix doc with default value with GH-523
* lib/tempfile.rb (Tempfile#initialize): [DOC] the first parameter
  `basename` is optional and defaulted to an empty string since
  [GH-523].  [Fix GH-1225]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

mrkn pushed a commit to mrkn/ruby that referenced this pull request Apr 17, 2016

Fix doc with default value with rubyGH-523
* lib/tempfile.rb (Tempfile#initialize): [DOC] the first parameter
  `basename` is optional and defaulted to an empty string since
  [rubyGH-523].  [Fix rubyGH-1225]

git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/trunk@53668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

hsbt pushed a commit that referenced this pull request Nov 21, 2016

merge revision(s) 53668: [Backport #12759]
	* lib/tempfile.rb (Tempfile#initialize): [DOC] the first parameter
	  `basename` is optional and defaulted to an empty string since
	  [GH-523].  [Fix GH-1225]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.