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

Drop support for Ruby v2.1 #628

Closed
floehopper opened this issue Nov 12, 2023 · 0 comments · Fixed by #695
Closed

Drop support for Ruby v2.1 #628

floehopper opened this issue Nov 12, 2023 · 0 comments · Fixed by #695

Comments

@floehopper
Copy link
Member

floehopper commented Nov 12, 2023

This version has been EOL since 31 Mar 2017, i.e. nearly 8 years ago.

floehopper added a commit that referenced this issue Dec 8, 2024
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 added a commit that referenced this issue Dec 8, 2024
This version has been EOL since 31 Mar 2017 [1], which is almost 8 years
ago.

`Mocha::Configuration#stubbing_method_on_nil` and `StubbingNilTest` are
now moot, because as of Ruby v2.2 `nil` is frozen.  The behaviour tested
in the latter is already tested in the more generic
`StubbingFrozenObjectTest`. See this commit [2] for details.

Closes #628.

[1]: https://www.ruby-lang.org/en/downloads/branches/
[2]: a65ea1e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant