Override initialize in bundle rubygems_ext for NameTuple#7239
Override initialize in bundle rubygems_ext for NameTuple#7239martinemde merged 1 commit intomasterfrom
Conversation
6412dfb to
f63ce68
Compare
|
It's hard to tell if this code is fine or it's just always circumvented. I did run the suite without the guard before pushing and it passed, but I wonder if we should even bother with the guard because the .to_s is such a cheap operation. |
You mean that our test suite is maybe never instantiating a Regardless of that, I like this patch because it makes it clear how we are monkey patching |
|
Sorry, I meant that because there's a guard in place, that unless there's a test suite that runs new bundler against an old version of rubygems, it won't ever patch initialize. I'm sure we have tests that use a Gem::Platform arg in a NameTuple. (Edit: uh oh, if you go look at that PR we aren't getting any failures other than the rubygems test for the behavior. I was so confident because I added this literally because of the places in bundler tests where this caused failures. Hmm. I'm happy to merge this as a better approach anyway.) |
There is! See |
Yeah! That's why when I opened #7229 completely removing this override, I was surprised that everything passed. Probably worth looking into why. |
|
This did not prevent segfaults. I linked a recent one in the ruby bug tracker should have included this commit. |
What was the end-user or developer problem that led to this PR?
In PR #7229 we were discussing alternative ways to add this back-ported feature.
What is your fix for the problem, implemented in this PR?
This avoids overriding
.newby aliasing initialize to see if it makes any difference on segfaults. Guards tho feature better against rubygems that already have the feature.Make sure the following tasks are checked