ostinelli / net-http2

NetHttp2 is an HTTP/2 client for Ruby.
MIT License
140 stars 31 forks source link

HTTP2::Client.new throws ArgumentError (wrong number of arguments (given 1, expected 0)) on Ruby 3.0 #44

Closed rgaufman closed 3 years ago

rgaufman commented 3 years ago

I'm getting this:

irb(main):001:0> require 'net-http2'
=> true
irb(main):003:1' HTTP2::Client.new
Traceback (most recent call last):
       10: from /opt/homebrew/opt/ruby/bin/irb:23:in `<main>'
        9: from /opt/homebrew/opt/ruby/bin/irb:23:in `load'
        8: from /opt/homebrew/Cellar/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb:11:in `<top (required)>'
        7: from (irb):2:in `<main>'
        6: from (irb):3:in `rescue in <main>'
        5: from (irb):3:in `new'
        4: from /opt/homebrew/lib/ruby/gems/3.0.0/gems/http-2-0.10.2/lib/http/2/client.rb:28:in `initialize'
        3: from /opt/homebrew/lib/ruby/gems/3.0.0/gems/http-2-0.10.2/lib/http/2/connection.rb:79:in `initialize'
        2: from /opt/homebrew/lib/ruby/gems/3.0.0/gems/http-2-0.10.2/lib/http/2/connection.rb:79:in `new'
        1: from /opt/homebrew/lib/ruby/gems/3.0.0/gems/http-2-0.10.2/lib/http/2/compressor.rb:333:in `initialize'
ArgumentError (wrong number of arguments (given 1, expected 0))

This is my environment

Romans-MacBook-Pro-2.local ➜  bin  ruby --version
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin20]
Romans-MacBook-Pro-2.local ➜  bin  gem --version net-http2
3.2.3
Romans-MacBook-Pro-2.local ➜  bin  uname -a
Darwin Romans-MacBook-Pro-2.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 arm64

Any ideas?

ostinelli commented 3 years ago

I haven't tried Ruby 3.0.0 yet. This gems depends on http-2, can you try to downgrade it to 0.10.1 and see if this persists?

SqueezedLight commented 3 years ago

I can confirm that this gem is incompatible with ruby 3.0.0. http-2 has a fix already...

ostinelli commented 3 years ago

49387b55a58efea7357035811753757b535b62d6