aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/gc/disable_spec.rb
blob: b0221d8520acb9c9643754577e617289d4ef6613 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require_relative '../../spec_helper'

describe "GC.disable" do
  after :each do
    GC.enable
  end

  it "returns true iff 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