aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/gc/disable_spec.rb
blob: f89a9d27681160a02b7a02ebfa09044ce5d00d93 (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 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