Project

General

Profile

Feature #8684 ยป patch.diff

Glass_saga (Masaki Matsushita), 07/25/2013 08:40 PM

View differences:

gc.c
int old = dont_gc;
dont_gc = TRUE;
return old ? Qtrue : Qfalse;
if (rb_block_given_p())
return rb_ensure(rb_yield, Qnil, rb_gc_enable, Qnil);
else
return old ? Qtrue : Qfalse;
}
void
test/ruby/test_gc.rb
GC.enable
end
def test_disable_with_block
GC.enable
GC.disable do
assert_equal(true, GC.disable)
end
assert_equal(false, GC.enable)
ensure
GC.enable
end
def test_count
c = GC.count
GC.start
    (1-1/1)