diff options
author | Jeremy Evans <[email protected]> | 2019-04-07 16:44:49 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2019-08-30 12:39:31 -0700 |
commit | d08e1004e0ee1286e4513de2a170391a4d0a0116 (patch) | |
tree | 5c7dd8244c2bf4c0f9b06725f3585c7ffc710ef3 /lib/tempfile.rb | |
parent | 3f67fcd3d5ca5e2907790eb5bb16d03f5884ece8 (diff) |
Fix keyword argument separation issues in lib
Mostly requires adding ** in either calls or method definitions.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r-- | lib/tempfile.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 4678a191a7..66d206a938 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -128,7 +128,7 @@ class Tempfile < DelegateClass(File) @unlinked = false @mode = mode|File::RDWR|File::CREAT|File::EXCL - ::Dir::Tmpname.create(basename, tmpdir, options) do |tmpname, n, opts| + ::Dir::Tmpname.create(basename, tmpdir, **options) do |tmpname, n, opts| opts[:perm] = 0600 @tmpfile = File.open(tmpname, @mode, opts) @opts = opts.freeze @@ -326,7 +326,7 @@ end # def Tempfile.create(basename="", tmpdir=nil, mode: 0, **options) tmpfile = nil - Dir::Tmpname.create(basename, tmpdir, options) do |tmpname, n, opts| + Dir::Tmpname.create(basename, tmpdir, **options) do |tmpname, n, opts| mode |= File::RDWR|File::CREAT|File::EXCL opts[:perm] = 0600 tmpfile = File.open(tmpname, mode, opts) |