diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-02 15:32:00 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-02 15:32:00 +0900 |
commit | b96a3a6fd2093e1dbea5491c002da515652dd347 (patch) | |
tree | fe074ae6bb178221f297fbb97c67888cc54e4bcf /test | |
parent | dfc8060756b25a33e078883ef095af6600c0a54b (diff) |
Move `GC.verify_compaction_references` [Bug #18779]
Define `GC.verify_compaction_references` as a built-in ruby method,
according to GC compaction support via `GC::OPTS`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5972
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_gc_compact.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb index be27199cdc..70b4b6ea27 100644 --- a/test/ruby/test_gc_compact.rb +++ b/test/ruby/test_gc_compact.rb @@ -11,16 +11,7 @@ end class TestGCCompact < Test::Unit::TestCase module CompactionSupportInspector def supports_auto_compact? - return false if /wasm/ =~ RUBY_PLATFORM - return true unless defined?(Etc::SC_PAGE_SIZE) - - begin - return GC::INTERNAL_CONSTANTS[:HEAP_PAGE_SIZE] % Etc.sysconf(Etc::SC_PAGE_SIZE) == 0 - rescue NotImplementedError - rescue ArgumentError - end - - true + GC::OPTS.include?("GC_COMPACTION_SUPPORTED") end end |