Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Print a deprecation warning for chilled strings #92

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

Closed
wants to merge 1 commit into from

Conversation

Earlopain
Copy link

ruby/ruby#10262 (comment)

As far as I can tell, since this isn't exposed there is no good way to actually get this information "officially". I'm not very familiar with programming ruby itself and even less familiar with C.

If there is a better way to do this, feel free to take over.

cc @casperisfine

// From internal/string.h
// Ruby 3.4 introduces "chilled" strings, which behave like frozen strings unless written to.
// In order to facilitate an easier upgrade path, print a deprecation warning instead of raising.
#define STR_CHILLED FL_USER3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is a big no no.

I'll see if I can find a better solution.

Copy link
Author

@Earlopain Earlopain Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking into it. I had an inkling that this might be the case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's my solution: #93

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's certainly better

@Earlopain Earlopain closed this Mar 22, 2024
@Earlopain Earlopain deleted the chilled-strings-deprecation branch March 22, 2024 16:26
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