Skip to content
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

Fix included modules on Ruby 3.4 #1091

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sailor
Copy link

@sailor sailor commented Jan 10, 2025

We currently get this error when trying to use webmock with Ruby 3.4:

Failure/Error: require File.expand_path('../config/environment', __dir__)

NameError:
  undefined method 'do_get_block' for class 'WebMockHTTPClient'
# /gems/webmock-3.24.0/lib/webmock/http_lib_adapters/httpclient_adapter.rb:233:in 'Module#alias_method'

It seems that it's defining aliases from method that are not included yet is not supported anymore by ruby >= 3.4.

This patch fixes the problem by just including the module before defining the aliases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant