From: Eric Wong Date: 2014-12-19T01:10:55+00:00 Subject: [ruby-core:66960] Re: [ruby-trunk - Bug #10620] [Open] #define_singleton_method keeps object from being garbage collected Try the following infinite loop, I see stable memory usage: loop do obj = Object.new obj.define_singleton_method(:f) { "F" } end Not even multiple calls to GC.start can guarantee an object is collected, as the current Ruby GC is conservative and not precise. Precise GC should solve the problem, but that is a lot of work (and we'd still need a conservative part for 3rd party extensions for years)