Skip to content

Commit

Permalink
Cleanup GC.auto_compact spec
Browse files Browse the repository at this point in the history
* Make the supported check more obvious.
  • Loading branch information
eregon committed Oct 29, 2021
1 parent 800dad6 commit a954f27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/ruby/core/gc/auto_compact_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit a954f27

Please sign in to comment.