Skip to content

Commit c9d2fc6

Browse files
committed
fix deprecation warning
1 parent f6dc08c commit c9d2fc6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/execjs/external_runtime.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def exec_runtime(filename)
173173
begin
174174
command = binary.split(" ") << filename
175175
`#{shell_escape(*command)} 2>&1 > #{path}`
176-
output = File.open(path, 'rb', @popen_options) { |f| f.read }
176+
output = File.open(path, 'rb', **@popen_options) { |f| f.read }
177177
ensure
178178
File.unlink(path) if path
179179
end
@@ -197,7 +197,7 @@ def shell_escape(*args)
197197

198198
def exec_runtime(filename)
199199
command = "#{Shellwords.join(binary.split(' ') << filename)} 2>&1"
200-
io = IO.popen(command, @popen_options)
200+
io = IO.popen(command, **@popen_options)
201201
output = io.read
202202
io.close
203203

@@ -209,7 +209,7 @@ def exec_runtime(filename)
209209
end
210210
else
211211
def exec_runtime(filename)
212-
io = IO.popen(binary.split(' ') << filename, @popen_options.merge({err: [:child, :out]}))
212+
io = IO.popen(binary.split(' ') << filename, **(@popen_options.merge({err: [:child, :out]})))
213213
output = io.read
214214
io.close
215215

0 commit comments

Comments
 (0)