Skip to content

Make Complex#{inspect,to_s} work correctly if real part #inspect returns frozen string - #11657

Merged
eregon merged 1 commit into
ruby:masterfrom
jeremyevans:fix-complex-inspect-for-frozen-real-20337
Sep 21, 2024
Merged

Make Complex#{inspect,to_s} work correctly if real part #inspect returns frozen string#11657
eregon merged 1 commit into
ruby:masterfrom
jeremyevans:fix-complex-inspect-for-frozen-real-20337

Conversation

@jeremyevans

Copy link
Copy Markdown
Contributor

Make static f_format function take a non-frozen string to append to.

This does not result in an additional allocation for #inspect, but it does result in an additional allocation for #to_s.

Fixes [Bug #20337]

…rns frozen string

Make static f_format function take a non-frozen string to append
to.

This does not result in an additional allocation for #inspect,
but it does result in an additional allocation for #to_s.

Fixes [Bug #20337]
@eregon
eregon merged commit 9f574fa into ruby:master Sep 21, 2024
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