diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-10-29 21:59:35 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-10-29 21:59:35 +0200 |
commit | a954f273a89f517de188bdd77e73a80a9c9dad2c (patch) | |
tree | 67e176e85e84fc11ce23ef2d336ba08fde12ea89 /spec | |
parent | 800dad62970989c0afeb26f1780c53683335a8d9 (diff) | |
download | ruby-a954f273a89f517de188bdd77e73a80a9c9dad2c.tar.gz |
Cleanup GC.auto_compact spec
* Make the supported check more obvious.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/core/gc/auto_compact_spec.rb | 5 |
1 files 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 96e7d3923c..386725996d 100644 --- a/spec/ruby/core/gc/auto_compact_spec.rb +++ b/spec/ruby/core/gc/auto_compact_spec.rb @@ -3,14 +3,15 @@ require_relative '../../spec_helper' 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 |