ruby-changes:57631
From: Jeremy <ko1@a...>
Date: Sat, 7 Sep 2019 12:00:18 +0900 (JST)
Subject: [ruby-changes:57631] 434582d888 (master): Fix Tempfile.open to correctly pass keywords to Tempfile.new
https://git.ruby-lang.org/ruby.git/commit/?id=434582d888 From 434582d888ad2982ec01d9b5a1e1afe8480312ab Mon Sep 17 00:00:00 2001 From: Jeremy Evans <code@j...> Date: Fri, 6 Sep 2019 13:37:09 -0700 Subject: Fix Tempfile.open to correctly pass keywords to Tempfile.new diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 66d206a..2bd124a 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -287,8 +287,8 @@ class Tempfile < DelegateClass(File) https://github.com/ruby/ruby/blob/trunk/lib/tempfile.rb#L287 # ensure # f.close # end - def open(*args) - tempfile = new(*args) + def open(*args, **kw) + tempfile = new(*args, **kw) if block_given? begin -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/