diff --git a/ffi/Gemfile b/ffi/Gemfile index f80e899..0bbe487 100644 --- a/ffi/Gemfile +++ b/ffi/Gemfile @@ -12,5 +12,9 @@ end group :test do gem "async" gem "io-endpoint" + # io-event 1.9.0 broke the compat with our "fork based test" + # See discussion in https://github.com/bryanp/llhttp/pull/34 + # and https://github.com/socketry/io-event/issues/36 + gem "io-event", "~> 1.8.0" gem "rspec" end diff --git a/ffi/lib/llhttp.rb b/ffi/lib/llhttp.rb index 236c81e..329b06c 100644 --- a/ffi/lib/llhttp.rb +++ b/ffi/lib/llhttp.rb @@ -10,6 +10,7 @@ module LLHttp require_relative "llhttp/version" extend FFI::Library + ffi_lib(FFI::Compiler::Loader.find("llhttp-ext")) callback :llhttp_data_cb, [:pointer, :size_t], :void diff --git a/mri/Gemfile b/mri/Gemfile index f80e899..0bbe487 100644 --- a/mri/Gemfile +++ b/mri/Gemfile @@ -12,5 +12,9 @@ end group :test do gem "async" gem "io-endpoint" + # io-event 1.9.0 broke the compat with our "fork based test" + # See discussion in https://github.com/bryanp/llhttp/pull/34 + # and https://github.com/socketry/io-event/issues/36 + gem "io-event", "~> 1.8.0" gem "rspec" end diff --git a/mri/lib/llhttp/parser.rb b/mri/lib/llhttp/parser.rb index 949e4e2..95f82aa 100644 --- a/mri/lib/llhttp/parser.rb +++ b/mri/lib/llhttp/parser.rb @@ -49,4 +49,4 @@ def initialize(delegate, type: :both) end end -require_relative "../llhttp_ext" +require "llhttp_ext"