diff options
Diffstat (limited to 'spec/ruby/core/gc/auto_compact_spec.rb')
-rw-r--r-- | spec/ruby/core/gc/auto_compact_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/ruby/core/gc/auto_compact_spec.rb b/spec/ruby/core/gc/auto_compact_spec.rb new file mode 100644 index 0000000000..d77ed44452 --- /dev/null +++ b/spec/ruby/core/gc/auto_compact_spec.rb @@ -0,0 +1,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 + end + end +end |