diff options
Diffstat (limited to 'spec/ruby/core/gc/disable_spec.rb')
| -rw-r--r-- | spec/ruby/core/gc/disable_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/ruby/core/gc/disable_spec.rb b/spec/ruby/core/gc/disable_spec.rb new file mode 100644 index 0000000000..f89a9d2768 --- /dev/null +++ b/spec/ruby/core/gc/disable_spec.rb @@ -0,0 +1,18 @@ +require_relative '../../spec_helper' + +describe "GC.disable" do + after :each do + GC.enable + end + + it "returns true if and only if the garbage collection was previously disabled" do + GC.enable + GC.disable.should == false + GC.disable.should == true + GC.disable.should == true + GC.enable + GC.disable.should == false + GC.disable.should == true + end + +end |
