diff --git a/lib/childprocess.rb b/lib/childprocess.rb index 09cc132..6df74ed 100644 --- a/lib/childprocess.rb +++ b/lib/childprocess.rb @@ -16,14 +16,14 @@ def new(*args) case os when :macosx, :linux, :solaris, :bsd, :cygwin, :aix if posix_spawn? - Unix::PosixSpawnProcess.new(args) + Unix::PosixSpawnProcess.new(*args) elsif jruby? - JRuby::Process.new(args) + JRuby::Process.new(*args) else - Unix::ForkExecProcess.new(args) + Unix::ForkExecProcess.new(*args) end when :windows - Windows::Process.new(args) + Windows::Process.new(*args) else raise Error, "unsupported platform #{platform_name.inspect}" end diff --git a/lib/childprocess/abstract_process.rb b/lib/childprocess/abstract_process.rb index 5cac444..93fd064 100644 --- a/lib/childprocess/abstract_process.rb +++ b/lib/childprocess/abstract_process.rb @@ -39,7 +39,7 @@ class AbstractProcess # @see ChildProcess.build # - def initialize(args) + def initialize(*args) unless args.all? { |e| e.kind_of?(String) } raise ArgumentError, "all arguments must be String: #{args.inspect}" end