From c9d2fc6e35b79a6a533c40d358a3291d86fb9f07 Mon Sep 17 00:00:00 2001 From: pavel Date: Mon, 16 Nov 2020 21:52:58 +0100 Subject: [PATCH] fix deprecation warning --- lib/execjs/external_runtime.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/execjs/external_runtime.rb b/lib/execjs/external_runtime.rb index 9a4b493..98f7489 100644 --- a/lib/execjs/external_runtime.rb +++ b/lib/execjs/external_runtime.rb @@ -173,7 +173,7 @@ module ExecJS begin command = binary.split(" ") << filename `#{shell_escape(*command)} 2>&1 > #{path}` - output = File.open(path, 'rb', @popen_options) { |f| f.read } + output = File.open(path, 'rb', **@popen_options) { |f| f.read } ensure File.unlink(path) if path end @@ -197,7 +197,7 @@ module ExecJS def exec_runtime(filename) command = "#{Shellwords.join(binary.split(' ') << filename)} 2>&1" - io = IO.popen(command, @popen_options) + io = IO.popen(command, **@popen_options) output = io.read io.close @@ -209,7 +209,7 @@ module ExecJS end else def exec_runtime(filename) - io = IO.popen(binary.split(' ') << filename, @popen_options.merge({err: [:child, :out]})) + io = IO.popen(binary.split(' ') << filename, **(@popen_options.merge({err: [:child, :out]}))) output = io.read io.close