diff options
| author | Matt Valentine-House <matt@eightbitraptor.com> | 2022-12-21 15:48:00 +0000 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-01-03 08:47:48 -0500 |
| commit | 0dc989d031fb8c2b1e0d83e154455b612e3e4b96 (patch) | |
| tree | 55dd9f4501210d1ffd8627ea33f966412fbe9dd8 /spec/ruby/core/array/initialize_spec.rb | |
| parent | fdac148637af2eff49fecbf864f303a16d39bf8c (diff) | |
Fix Error in GC Compaction specs
Previously if any of the tests that move objects between size pools
failed to move anything, then the call to stats.dig would return `nil`
which would then cause assert_operator to error.
This should be a test Failure, rather than an Error so this commit uses
a default value of 0 if stats.dig fails to find a key.
Also refactor object movement tests to use stats.dig, rather than :[]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6978
Diffstat (limited to 'spec/ruby/core/array/initialize_spec.rb')
0 files changed, 0 insertions, 0 deletions
