1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Skip GC.auto_compact= spec for platforms not supporting it

* See https://github.com/ruby/spec/pull/891
This commit is contained in:
Benoit Daloze 2021-10-29 21:54:17 +02:00
parent 2e14fb7df7
commit 800dad6297

View file

@ -2,18 +2,19 @@ require_relative '../../spec_helper'
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