Issue #8684 has been reported by Glass_saga (Masaki Matsushita).

----------------------------------------
Feature #8684: GC.disable with block
https://bugs.ruby-lang.org/issues/8684

Author: Glass_saga (Masaki Matsushita)
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: current: 2.1.0


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

usage:

GC.disable do
  do_something # GC disabled
end
# GC enabled


-- 
http://bugs.ruby-lang.org/