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

Add stub test for public module method that was private #902

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

Conversation

gmcgibbon
Copy link

@gmcgibbon gmcgibbon commented Feb 22, 2022

Adds a test to stub a method that was previously private and explicitly made public. For some reason, this fails on Ruby 3.1.0 (the method reverts to being private). This is a regression in CRuby somewhere, probably related to method aliasing. Still, I believe the test is worth adding to prevent future regressions.

I've opened https://bugs.ruby-lang.org/issues/18600 as well to address the regression in Ruby.

@zenspider zenspider self-assigned this Apr 10, 2022
@zenspider
Copy link
Collaborator

That's a really strange good find... glad it got fixed in ruby. I'll see about guarding this in a way that passes on the guilty versions and notifies once there's a 3.1 that works.

@zenspider zenspider force-pushed the test_public_stub_that_was_private branch from 10ff7ea to 0a65d0b Compare October 19, 2022 18:16
@zenspider
Copy link
Collaborator

zenspider commented Oct 19, 2022

Just rebased to force a retest... still brokey... on 3.1 but not head... Odd because you can see that bug getting fixed 7 months ago and I could have sworn there's been a patch release since then?

@gmcgibbon
Copy link
Author

gmcgibbon commented Oct 19, 2022

https://www.ruby-lang.org/en/news/2022/04/12/ruby-3-1-2-released/

It looks like 3.1.2 was released after this was fixed in ruby/ruby#5592. CI is using 3.1.2, so I guess it wasn't included.

Looks like it will be in 3.1.3: ruby/ruby@9d11ddc

@zenspider
Copy link
Collaborator

Better go dig up a CVE worthy bug so they have a forcing function to do another release. 😛

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

Successfully merging this pull request may close these issues.

None yet

2 participants