Skip to content

Commit

Permalink
Skip GC.auto_compact= spec for platforms not supporting it
Browse files Browse the repository at this point in the history
* See #891
  • Loading branch information
eregon committed Oct 29, 2021
1 parent 21a48d9 commit df7768f
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions core/gc/auto_compact_spec.rb
Expand Up @@ -2,18 +2,19 @@

ruby_version_is "3.0" do
describe "GC.auto_compact" do
before :each do
@default = GC.auto_compact
end

after :each do
GC.auto_compact = @default
end

it "can set and get a boolean value" do
original = GC.auto_compact
GC.auto_compact = !original
GC.auto_compact.should == !original
begin
GC.auto_compact = !original
rescue NotImplementedError # platform does not support autocompact
skip
end

begin
GC.auto_compact.should == !original
ensure
GC.auto_compact = original
end
end
end
end

0 comments on commit df7768f

Please sign in to comment.