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

YJIT: Enhance the String#<< method substitution to handle integer codepoint values. #11032

Merged
merged 4 commits into from
Aug 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify passing a byte value to str_buf_cat.
  • Loading branch information
nirvdrum committed Aug 2, 2024
commit e20b87622ea71b597779305e7ed1da9048a7fbe3
3 changes: 1 addition & 2 deletions string.c
Original file line number Diff line number Diff line change
Expand Up @@ -3375,8 3375,7 @@ rb_str_buf_cat_byte(VALUE str, unsigned char byte)
}
else {
// If there's not enough string_capacity, make a call into the general string concatenation function.
char buf[1] = {byte};
str_buf_cat(str, buf, 1);
str_buf_cat(str, (char *)&byte, 1);
}

// If the code range is already known, we can derive the resulting code range cheaply by looking at the byte we
Expand Down