lib/execjs/external_runtime.rb in execjs-2.7.0 vs lib/execjs/external_runtime.rb in execjs-2.8.0

- old
+ new

@@ -171,11 +171,11 @@ def exec_runtime(filename) path = Dir::Tmpname.create(['execjs', 'json']) {} 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 if $?.success? @@ -195,11 +195,11 @@ elsif RUBY_ENGINE == 'jruby' require 'shellwords' 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 if $?.success? output @@ -207,10 +207,10 @@ raise exec_runtime_error(output) end 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 if $?.success? output