File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030
3131 it "does not change settings that aren't present in the hash" do
3232 previous = GC . config
33- GC . config ( { } ) . should == previous . except ( :implementation )
33+ GC . config ( { } )
3434 GC . config . should == previous
3535 end
3636
3737 it "ignores unknown keys" do
3838 previous = GC . config
39- GC . config ( foo : "bar" ) . should == previous . except ( :implementation )
39+ GC . config ( foo : "bar" )
4040 GC . config . should == previous
4141 end
4242
43+ ruby_version_is "" ..."4.0" do
44+ it "returns the same as GC.config but without the :implementation key" do
45+ previous = GC . config
46+ GC . config ( { } ) . should == previous . except ( :implementation )
47+ end
48+ end
49+
50+ ruby_version_is "4.0" do
51+ it "returns the same as GC.config, including the :implementation key" do
52+ previous = GC . config
53+ GC . config ( { } ) . should == previous
54+ end
55+ end
56+
4357 it "raises an ArgumentError if options include global keys" do
4458 -> { GC . config ( implementation : "default" ) } . should raise_error ( ArgumentError , 'Attempting to set read-only key "Implementation"' )
4559 end
You can’t perform that action at this time.
0 commit comments