Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/execjs/external_runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def exec_runtime(filename)
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
Expand All @@ -197,7 +197,7 @@ def shell_escape(*args)

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

Expand All @@ -209,7 +209,7 @@ def exec_runtime(filename)
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

Expand Down