For some reason this little cleanup doesn't sit well with me. Probably because `if` can also be used as tail-modifier, so when I see it halfway through a line I mentally think that the part of the line that precedes it is conditionally executed.

Maybe this instead?

```ruby
      redirect_stdout do
        @pid = case
               when Capybara::Poltergeist.windows?
                 then Process.spawn(*command.map(&:to_s))
               else Process.spawn(*command.map(&:to_s), pgroup: true)
               end
        ObjectSpace.define_finalizer(self, self.class.process_killer(@pid) )
      end
```

or even a refactor of the only real logic difference in that branch:

```ruby
    def start
      check_phantomjs_version
      @read_io, @write_io = IO.pipe
      @out_thread = Thread.new {
        while !@read_io.eof? && data = @read_io.readpartial(1024)
          @phantomjs_logger.write(data)
        end
      }
      process_options = {}
      process_options[:pgroup] = true unless Capybara::Poltergeist.windows?

      redirect_stdout do
        @pid = Process.spawn(*command.map(&:to_s), process_options)
        ObjectSpace.define_finalizer(self, self.class.process_killer(@pid) )
      end
    end
```