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

Use a better and more reliable check for whether a method is the same as Class#new #1470

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

eregon
Copy link
Contributor

@eregon eregon commented Apr 21, 2022

The added test would fail without the change.
This also helps for TruffleRuby support (rspec/rspec-metagem#68), as TruffleRuby does not plan to replicate that CRuby inconsistency/bug (https://bugs.ruby-lang.org/issues/18729).

@eregon eregon force-pushed the better-check-for-Class-new branch from bc6c0b3 to b68cfb3 Compare April 21, 2022 14:33
@eregon eregon force-pushed the better-check-for-Class-new branch from b68cfb3 to 363c1e4 Compare April 21, 2022 14:34
@eregon eregon force-pushed the better-check-for-Class-new branch from 1179abe to c0c2e44 Compare April 22, 2022 12:34
@JonRowe JonRowe merged commit e994d52 into rspec:main Apr 22, 2022
JonRowe added a commit that referenced this pull request Apr 23, 2022
JonRowe added a commit that referenced this pull request Apr 23, 2022
Use a better and more reliable check for whether a method is the same as Class#new
JonRowe added a commit that referenced this pull request Apr 23, 2022
@eregon
Copy link
Contributor Author

eregon commented Apr 23, 2022

Unfortunately this doesn't seem to work on CRuby master, even though it does work on 3.0 and 3.1.
I've filed https://bugs.ruby-lang.org/issues/18751, it seems a CRuby regression.

@eregon
Copy link
Contributor Author

eregon commented Aug 20, 2022

I fixed that CRuby issue, and with a rerun of main on my fork ruby-head now passes 🎉
https://github.com/eregon/rspec-mocks/runs/7931839710?check_suite_focus=true

pirj added a commit that referenced this pull request Oct 16, 2022
pirj pushed a commit that referenced this pull request Nov 1, 2022
pirj pushed a commit that referenced this pull request Nov 1, 2022
pirj pushed a commit that referenced this pull request Nov 1, 2022
pirj pushed a commit that referenced this pull request Nov 1, 2022
JonRowe added a commit that referenced this pull request Nov 10, 2022
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.

2 participants