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

dissolved
Copy link

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
Copy link

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

@zzak
Copy link
Member

zzak commented Feb 8, 2014

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

@dissolved
Copy link
Author

Done.

@ayumin
Copy link
Member

ayumin commented May 8, 2014

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

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
Copy link
Author

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.

@hsbt hsbt closed this in 05c108c Jan 4, 2015
ayumin pushed a commit to ayumin/ruby that referenced this pull request Jan 4, 2015
  [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
  [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
* 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
* 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
	* 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
Labels
None yet
4 participants