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
base: trunk
from

Conversation

4 participants
@dissolved

dissolved 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.

Show comment
Hide comment
@saturnflyer

saturnflyer Jan 31, 2014

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

saturnflyer commented Jan 31, 2014

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

@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Feb 8, 2014

Member

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

Member

zzak commented Feb 8, 2014

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

@dissolved

This comment has been minimized.

Show comment
Hide comment
@dissolved

dissolved commented Feb 9, 2014

Done.

@ayumin

This comment has been minimized.

Show comment
Hide comment
@ayumin

ayumin May 8, 2014

Member

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

Member

ayumin 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.

Show comment
Hide comment
@dissolved

dissolved 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.

dissolved 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.

@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 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

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

* 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

sunboshan added a commit to sunboshan/ruby that referenced this pull request Jan 26, 2016

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 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://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