From: "matz (Yukihiro Matsumoto)" Date: 2013-07-26T00:22:27+09:00 Subject: [ruby-core:56170] [ruby-trunk - Feature #8684][Rejected] GC.disable with block Issue #8684 has been updated by matz (Yukihiro Matsumoto). 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. ---------------------------------------- Feature #8684: GC.disable with block https://bugs.ruby-lang.org/issues/8684#change-40663 Author: Glass_saga (Masaki Matsushita) Status: Rejected 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/