diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-05-12 09:49:59 +0200 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2025-05-12 09:49:59 +0200 |
| commit | 131ba059cad0cff223842a739b2bc87425613b49 (patch) | |
| tree | 6d310a1304820873a51d3553c1f0ded524cb320f /spec/ruby | |
| parent | f638e1483835aa0497754723798a83d3bd26eace (diff) | |
test_object_id.rb: use better randomness
When the test is repeated 20 or more times in the same process
it's not that unlikely for `rand(100_000)` to return the same thing
twice, causing `TestObjectIdTooComplexClass` to fail.
```
1) Failure:
TestObjectIdTooComplexClass#test_dup_with_id_and_ivar [/tmp/ruby/src/trunk-repeat20-asserts/test/ruby/test_object_id.rb:172]:
Expected #<struct RubyVM::Shape
id=6783,
parent_id=6774,
edge_name=:@___26417,
next_field_index=2,
heap_index=0,
type=1,
capacity=7> to be too_complex?.
```
Diffstat (limited to 'spec/ruby')
0 files changed, 0 insertions, 0 deletions
