mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Cleanup GC.auto_compact spec
* Make the supported check more obvious.
This commit is contained in:
parent
800dad6297
commit
a954f273a8
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue