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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Awesome! The parameter has become a useless require config. Thanks for this! |
@dissolved Could you rebase this? Something messed up on our svn+git sync. |
Done. |
@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.
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. |
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.