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

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