Issue #14092 has been reported by TheSmartnik (Nikita Misharin).

----------------------------------------
Feature #14092: Add extension key argument to Tempfile
https://bugs.ruby-lang.org/issues/14092

* Author: TheSmartnik (Nikita Misharin)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
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 



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>