diff options
author | Kevin Menard <kevin@nirvdrum.com> | 2022-07-25 21:04:03 -0400 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2022-07-26 09:03:44 +0200 |
commit | 9a8f6e392fbd9c145566ae18fa2128ef96369430 (patch) | |
tree | 67bcf5b308a88cc915a2b5d3ddbe42c8f506c8d3 /GPL | |
parent | 9e6d07f3462d29f340114650da9f13a36b866d5f (diff) | |
download | ruby-9a8f6e392fbd9c145566ae18fa2128ef96369430.tar.gz |
Cheaply derive code range for String#b return value
The result of String#b is a string with an ASCII_8BIT/BINARY encoding. That encoding is ASCII-compatible and has no byte sequences that are invalid for the encoding. If we know the receiver's code range, we can derive the resulting string's code range without needing to perform a full code range scan.
Diffstat (limited to 'GPL')
0 files changed, 0 insertions, 0 deletions