lib/opal/cli_runners/phantomjs.rb in opal-0.10.6 vs lib/opal/cli_runners/phantomjs.rb in opal-0.11.0.rc1

- old
+ new

@@ -1,5 +1,6 @@ +# frozen_string_literal: true require 'shellwords' module Opal module CliRunners class Phantomjs @@ -9,16 +10,16 @@ @output = options.fetch(:output, $stdout) end attr_reader :output, :exit_status def run(code, argv) - command = [ + phantomjs_command = [ 'phantomjs', SCRIPT_PATH.shellescape, *argv.map(&:shellescape) ].join(' ') - phantomjs = IO.popen(command, 'w', out: output) do |io| + IO.popen(phantomjs_command, 'w', out: output) do |io| io.write(code) end @exit_status = $?.exitstatus end