-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ruby 3.4 to CI #1087
base: master
Are you sure you want to change the base?
Add Ruby 3.4 to CI #1087
Conversation
Ruby 3.4 was released on Christmas Day. Merry Christmas to those who celebrate the holiday! 🎄
hey @rodrigoargumedo , just saw this PR here, and thanks for opening it for ruby 3.4. For context, trying to run webmock in ruby 3.4 but been getting an error like: An error occurred while loading spec_helper.
Failure/Error: require 'webmock/rspec'
NameError:
undefined method 'do_get_block' for class 'WebMockHTTPClient'
# [REDACTED]/.rvm/gems/ruby-3.4.1/gems/webmock-3.24.0/lib/webmock/http_lib_adapters/httpclient_adapter.rb:233:in 'Module#alias_method'
# [REDACTED]/.rvm/gems/ruby-3.4.1/gems/webmock-3.24.0/lib/webmock/http_lib_adapters/httpclient_adapter.rb:233:in '<class:WebMockHTTPClient>'
# [REDACTED]/.rvm/gems/ruby-3.4.1/gems/webmock-3.24.0/lib/webmock/http_lib_adapters/httpclient_adapter.rb:232:in '<top (required)>'
# [REDACTED]/.rvm/gems/ruby-3.4.1/gems/webmock-3.24.0/lib/webmock.rb:52:in 'Kernel#require_relative'
# [REDACTED]/.rvm/gems/ruby-3.4.1/gems/webmock-3.24.0/lib/webmock.rb:52:in '<top (required)>'
# [REDACTED]/.rvm/gems/ruby-3.4.1/gems/webmock-3.24.0/lib/webmock/rspec.rb:3:in '<top (required)>'
# ./spec/spec_helper.rb:4:in '<top (required)>' from what I can see there's an issue in the class: class WebMockHTTPClient < HTTPClient
alias_method :do_get_block_without_webmock, :do_get_block
alias_method :do_get_stream_without_webmock, :do_get_stream
include WebMockHTTPClients
end Not sure what ruby 3.4 included but seems like the reference to |
@filipealc Maybe related to this Ruby discussion: |
It's my first time interacting with the webmock codebase to be honest, but, looking at the code at httpclient_adapter.rb seems like the issue is more related to how we are importing modules maybe? |
I think there are two issues to solve, one is related to the current specs and how a hash is serialized to string in ruby 3.4. This should be fixed in #1092. The other is related to order of the inclusion of the modules. which I think should be fixed in #1091 . @bblimke , any chance you could take a look at the issues related to ruby 3.4? It would be great so we can update our projects to this new version. |
Ruby 3.4 was released on Christmas Day (December 25th, 2024). Merry Christmas to those who celebrate the holiday! 🎄