[ruby-core:99670] [Ruby master Feature#15974] Warn in verbose mode on defining a finalizer that captures the object
From:
chris@...
Date:
2020-08-22 02:54:02 UTC
List:
ruby-core #99670
Issue #15974 has been updated by chrisseaton (Chris Seaton). A partial solution to this but with a better implementation is at https://github.com/ruby/ruby/pull/3444. ---------------------------------------- Feature #15974: Warn in verbose mode on defining a finalizer that captures the object https://bugs.ruby-lang.org/issues/15974#change-87157 * Author: chrisseaton (Chris Seaton) * Status: Closed * Priority: Normal ---------------------------------------- There's a really common mistake people make when using `define_finalizer` - they capture the object in the finalizer. https://www.mikeperham.com/2010/02/24/the-trouble-with-ruby-finalizers/ This PR warns about that, when in verbose mode (it's too slow to do always.) https://github.com/ruby/ruby/pull/2264 -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>