diff --git a/binaryen.gemspec b/binaryen.gemspec index 4bc7d60..140aa89 100644 --- a/binaryen.gemspec +++ b/binaryen.gemspec @@ -15,5 +15,4 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/Shopify/binaryen-rb" spec.platform = Gem::Platform::RUBY spec.extensions = ["extconf.rb"] - spec.add_dependency("posix-spawn", "~> 0.3.15") end diff --git a/lib/binaryen/command.rb b/lib/binaryen/command.rb index b427876..83aba3a 100644 --- a/lib/binaryen/command.rb +++ b/lib/binaryen/command.rb @@ -1,12 +1,10 @@ # frozen_string_literal: true -require "posix/spawn" require "timeout" require "tempfile" module Binaryen class Command - include POSIX::Spawn DEFAULT_MAX_OUTPUT_SIZE = 256 * 1024 * 1024 * 1024 # 256 MiB DEFAULT_TIMEOUT = 10 DEFAULT_ARGS_FOR_COMMAND = {}.freeze @@ -44,7 +42,7 @@ def spawn_command(*args, stderr: nil, stdin: nil) File.open(File::NULL, "w") do |devnull| IO.pipe do |err_read, err_write| - pid = POSIX::Spawn.pspawn( + pid = Process.spawn( *args, "--output=#{tmpfile.path}", in_write.path,