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

Do not deduplicate strings with ivars #6899

Merged
merged 2 commits into from Oct 25, 2021
Merged

Conversation

headius
Copy link
Member

@headius headius commented Oct 21, 2021

CRuby 2.7 and earlier return the same string, frozen, when the string has instance variables. This differs from JRuby 9.3 and Ruby 3.0 behavior, which always returns the interned string, possibly losing the original instance variables or metaclass.

The 3.0 behavior will need to be restored for JRuby 9.4.

This appears to fix the issues demonstrated in #6895.

This is different in Ruby 3.0, which appears to deduplicate and
return a new string always. The 3.0 behavior will need to be
preserved in JRuby 9.4.
@headius headius added this to the JRuby 9.3.2.0 milestone Oct 21, 2021
@headius headius merged commit d58685b into jruby:master Oct 25, 2021
@headius headius deleted the string_dedup_ivars branch October 25, 2021 13:55
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.

None yet

1 participant