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:
parent
2e14fb7df7
commit
800dad6297
1 changed files with 11 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue