Ensure hard reference for frozen strings#1348
Conversation
|
Spurious failure in JRuby tests here was most likely due to unlucky GC timing. This should prevent such failures in the future: https://github.com/jruby/jruby/actions/runs/22466746658/job/65074368459 |
|
Now RuboCop doesn't like the |
For what it's worth: I think Rubocop has some value to keep the formatting/indentation consistent, but a lot of code in this repository is not idiomatic Ruby on purpose. |
|
Looks good. |
Will do and then merge. |
be665d0 to
9785abf
Compare
These frozen strings must be hard referenced until the identity has been tested, or an intervening GC could cause them to get collected and improperly fail the test. The cross-require global now points at the string in question and is cleared after the identity test.
9785abf to
a214323
Compare
|
GHA is down again so I'm merging without the final run. Tested locally on 3.4 and 4.0, it should be fine. |
These frozen strings must be hard referenced until the identity has been tested, or an intervening GC could cause them to get collected and improperly fail the test. The cross-require global now points at the string in question and is cleared after the identity test.