diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-03-07 21:38:30 +0100 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2025-03-08 10:56:02 +0100 |
| commit | a14d9b8d5777b05e288b412bcdef609f05389fd7 (patch) | |
| tree | cefbb304dd4c4f0f7417d7527186a06a7300cae8 /parse.y | |
| parent | eae0fe37c08b568c0a7cbf904caba4faca517746 (diff) | |
string.c: Improve `fstring_hash` to reduce collisions
`rb_str_hash` doesn't include the encoding for ASCII only strings
because ASCII only strings are equal regardless of their encoding.
But in the case if the `fstring_table`, two identical ASCII strings
with different encodings aren't equal.
Given it's common to have both `:foo` (or `def foo`) and `"foo"`
in the same source code, this causes a lot of collisions in the
`fstring_table`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12881
Diffstat (limited to 'parse.y')
0 files changed, 0 insertions, 0 deletions
