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

better constructors from string for Identifier and Symbol #205

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

froydnj
Copy link
Contributor

@froydnj froydnj commented Feb 26, 2024

This PR accomplishes two things:

  1. No need to construct a temporary string object just for Identifier(); and
  2. No need to duplicate effort to calculate the string length in rb_intern when we already have it available in the caller.

@jasonroelofs
Copy link
Collaborator

This looks good to me. Thanks!

@jasonroelofs jasonroelofs merged commit 27993c2 into ruby-rice:master Feb 27, 2024
15 checks passed
@froydnj froydnj deleted the froydnj-string-identifiers branch February 27, 2024 02:45
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