Project

General

Profile

Actions

Feature #8684

closed

GC.disable with block

Added by Glass_saga (Masaki Matsushita) over 10 years ago. Updated over 10 years ago.

Status:
Rejected
Assignee:
-
Target version:
[ruby-core:56168]

Description

I propose GC.disable with block.
It is useful to ensure GC.enable.

usage:

GC.disable do
do_something # GC disabled
end

GC enabled


Files

patch.diff (792 Bytes) patch.diff Glass_saga (Masaki Matsushita), 07/25/2013 08:40 PM

Updated by matz (Yukihiro Matsumoto) over 10 years ago

  • Status changed from Open to Rejected

It's easily done by

begin
GC.disable
do_something
ensure
GC.enable
end

and considering block scoping doesn't work well with threads, I don't think it's worth to add as a built-in.

Matz.

Actions

Also available in: Atom PDF

Like0
Like0