Skip to content

pkey/ec: avoid calling SYM2ID() on user-supplied objects #907

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

Merged
merged 1 commit into from
Jul 5, 2025

Conversation

rhenium
Copy link
Member

@rhenium rhenium commented Jul 4, 2025

Compare by the VALUE value instead of ID. Calling SYM2ID() on a dynamic symbol will pin a permanent ID.

These methods only accept known static symbols, and passing anything else is an incorrect usage that results in an exception. Nonetheless, avoiding SYM2ID() seems to be a good idea since there is no runtime cost.

Compare by the VALUE value instead of ID. Calling SYM2ID() on a dynamic
symbol will pin a permanent ID.

These methods only accept known static symbols, and passing anything
else is an incorrect usage that results in an exception. Nonetheless,
avoiding SYM2ID() seems to be a good idea since there is no runtime
cost.
@rhenium rhenium merged commit a27a0d0 into ruby:master Jul 5, 2025
41 checks passed
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.

1 participant