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

Expand specs for Thread variables #1127

Merged
merged 7 commits into from
Jun 26, 2024
Merged

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Jan 9, 2024

No description provided.

This makes the code more consistent.
The old one was a copy-paste of the setter.
* Test with frozen Thread
* Test with nil value which removes the entry
* Test different key types
* Test with frozen Thread
* Test different key types

The key type behaviour differs from Thread#thread_variable_set, keys
that raise a TypeError when setting result in a nil value when getting.
* Test with frozen Thread
* Test different key types

The key type behaviour is similar to Thread#thread_variable_get?
* Test different key types

This shows the Symbol type being used as the internal type.
core/thread/thread_variable_set_spec.rb Show resolved Hide resolved
core/thread/thread_variables_spec.rb Outdated Show resolved Hide resolved
@andrykonchin
Copy link
Member

Thank you!

@andrykonchin andrykonchin merged commit a57ed37 into ruby:master Jun 26, 2024
14 checks passed
@herwinw herwinw deleted the thread_variables branch June 26, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants