aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/gc
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-10-28 18:54:01 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-10-28 18:54:01 +0200
commitc75df796d875b02d7b97974c7fe840f0a9de171f (patch)
treeea9a4e1b98cdd1be834fe608e24ba20399184e5a /spec/ruby/core/gc
parent3bf36979d888cfa958c22fbf094ad10dabfe624d (diff)
downloadruby-c75df796d875b02d7b97974c7fe840f0a9de171f.tar.gz
Update to ruby/spec@21a48d9
Diffstat (limited to 'spec/ruby/core/gc')
-rw-r--r--spec/ruby/core/gc/auto_compact_spec.rb19
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