diff options
author | Jean Boussier <[email protected]> | 2024-04-17 09:59:50 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2024-04-17 10:35:14 +0200 |
commit | eac3dee9cdefcc414af832c99a95383a38790d1c (patch) | |
tree | 95ac1a8430339844c9314143f539674467cf32f4 /spec/ruby/core/thread | |
parent | d31eda8eb636b9cc1ef343df5688f1abea3409c9 (diff) |
test_uplus_minus: Use a different string literal
This test fail relatively frequently and it's unclear what is
happening.
```
str: {"address":"0x7fbdeb26d4e0", "type":"STRING", "shape_id":1, "slot_size":40, "class":"0x7fbdd1e0ec50", "frozen":true, "embedded":true, "fstring":true, "bytesize":3, "value":"bar", "encoding":"UTF-8", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}}
bar: {"address":"0x7fbdd0a8b138", "type":"STRING", "shape_id":1, "slot_size":40, "class":"0x7fbdd1e0ec50", "frozen":true, "embedded":true, "fstring":true, "bytesize":3, "value":"bar", "encoding":"UTF-8", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true}}
```
The `"bar".freeze` literal correctly put an old-gen fstring on the stack.
But `-%w(b a r).join('')` returns a young-gen fstring, which suggest it
somehow failed to find the old one in the `frozen_strings` table.
This could be caused by another test corrupting the table, or corrupting
the `"bar"` fstring.
By using a different literal value we can learn whether the bug is specific
to `"bar"` (used in many tests) or more general.
Diffstat (limited to 'spec/ruby/core/thread')
0 files changed, 0 insertions, 0 deletions