mirror of
https://github.com/teampoltergeist/poltergeist.git
synced 2022-11-09 12:05:00 -05:00
18 lines
310 B
Ruby
18 lines
310 B
Ruby
![]() |
require 'childprocess'
|
||
|
|
||
|
module Capybara::Poltergeist
|
||
|
module Spawn
|
||
|
def self.spawn(*args)
|
||
|
args = args.map(&:to_s)
|
||
|
|
||
|
if RUBY_VERSION >= "1.9"
|
||
|
Process.spawn(*args)
|
||
|
else
|
||
|
process = ChildProcess.build(*args)
|
||
|
process.start
|
||
|
process.pid
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|