-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Fix rb_interned_str_* functions to not assume static strings #3786
Conversation
350cd2e
to
fd19844
Compare
It makes sense to me that these functions should work on buffers that are not C string literals. In that case, we are creating some new APIs instead of merely exposing some previously internal ones without modification, meaning the title of the Redmine ticket is kind of a misnomer. I bring this up to make sure that everyone is on the same page about what these new functions are supposed to do. I didn't follow the discussion for the ticket. Code wise, I would prefer passing an additional parameter to |
Yes that a good point. I'll try to clean this up. |
fd19844
to
bd3753b
Compare
Fixes [Feature #13381] When passed a `fake_str`, `register_fstring` would create new strings with `str_new_static`. That's not what was expected, and answer almost no use cases.
bd3753b
to
506ff9b
Compare
@ko1 I'm sorry to bother you again with this but could you have a look? Without this PR I don't think |
Thank you I'm asking @nobu |
Thanks @nobu ! |
@ko1 is this good for you? |
Ah, I have no opinion, thank you so much to provide your efforts! |
Thanks! |
Followup: #3586
When passed a
fake_str
,register_fstring
would create new strings withstr_new_static
. That's not what was expected, and answer almost no use cases.