From a954f273a89f517de188bdd77e73a80a9c9dad2c Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 29 Oct 2021 21:59:35 +0200 Subject: [PATCH] Cleanup GC.auto_compact spec * Make the supported check more obvious. --- spec/ruby/core/gc/auto_compact_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/ruby/core/gc/auto_compact_spec.rb b/spec/ruby/core/gc/auto_compact_spec.rb index 96e7d3923c65f9..386725996d9532 100644 --- a/spec/ruby/core/gc/auto_compact_spec.rb +++ b/spec/ruby/core/gc/auto_compact_spec.rb @@ -3,14 +3,15 @@ ruby_version_is "3.0" do describe "GC.auto_compact" do it "can set and get a boolean value" do - original = GC.auto_compact begin - GC.auto_compact = !original + GC.auto_compact = GC.auto_compact rescue NotImplementedError # platform does not support autocompact skip end + original = GC.auto_compact begin + GC.auto_compact = !original GC.auto_compact.should == !original ensure GC.auto_compact = original