summaryrefslogtreecommitdiff
path: root/spec/ruby/core/gc/auto_compact_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/gc/auto_compact_spec.rb')
-rw-r--r--spec/ruby/core/gc/auto_compact_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/core/gc/auto_compact_spec.rb b/spec/ruby/core/gc/auto_compact_spec.rb
index 96e7d3923c..386725996d 100644
--- a/spec/ruby/core/gc/auto_compact_spec.rb
+++ b/spec/ruby/core/gc/auto_compact_spec.rb
@@ -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