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

Deprecate Configuration#stubbing_method_on_nil= #694

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

floehopper
Copy link
Member

From the docs:

This option only works for Ruby < v2.2.0. In later versions of Ruby
nil is frozen and so a StubbingError will be raised if you
attempt to stub a method on nil.

I'm planning to drop support for Ruby v2.1 at which point, this configuration option will be moot.

Closes #693.

Verified

This commit was signed with the committer’s verified signature.
drazisil-codecov Joe Becher
From the docs [1]:

> This option only works for Ruby < v2.2.0. In later versions of Ruby
> `nil` is frozen and so a `StubbingError` will be raised if you
> attempt to stub a method on `nil`.

I'm planning to drop support for Ruby v2.1 [2] at which point, this
configuration option will be moot.

Closes #693.

[1]: https://mocha.jamesmead.org/Mocha/Configuration.html#stubbing_method_on_nil=-instance_method
[2]: #628
@floehopper floehopper merged commit dc42922 into main Dec 8, 2024
17 checks passed
@floehopper floehopper deleted the deprecate-configuration-stubbing-method-on-nil branch December 8, 2024 00:25
@floehopper
Copy link
Member Author

Released in v2.7.1

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.

Deprecate Mocha::Configuration#stubbing_method_on_nil=
1 participant