Feature #14092
openAdd extension key argument to Tempfile
Description
I don't work with Tempfile often, but every time I do, I get surprised by an obscure way to pass an extension to file name.
You have to pass array, where first element is a file name and a second is a file extension (starting with a dot), which is quite a unique (not in a good way) and unusual interface for ruby.
I think a much better interface would be to use a separate key word for this.
I've researched the code and it seems we can achieve that without changing much code. I can make pr, if you think the idea is worthy
Updated by shevegen (Robert A. Heiler) about 7 years ago
It may be best to just publish your suggestion/PR anyway. I may be wrong but
the ruby core team and matz appear to be quite busy currently - see the queue of
other suggestions and changes. Perhaps they will do some "batch-discussions" of
many features/changes in meetings in japan with matz which seem to happen
once per month at best (before the x-mas release, which is not that far away,
so people should hurry up with suggestions for the next ruby release before
the change-window is for past ruby 2.5.x).
For anyone else who wants to have a look, here is the current tempfile
documentation / feature set:
https://ruby-doc.org/stdlib/libdoc/tempfile/rdoc/Tempfile.html