[#94657] [Ruby master Feature#16131] Remove $SAFE, taint and trust — naruse@...
Issue #16131 has been reported by naruse (Yui NARUSE).
3 messages
2019/08/29
[ruby-core:94166] [Ruby master Feature#15974] Warn in verbose mode on defining a finalizer that captures the object
From:
daniel@...42.com
Date:
2019-08-06 23:50:51 UTC
List:
ruby-core #94166
Issue #15974 has been updated by Dan0042 (Daniel DeLorme). Question: shouldn't this be an error rather than a warning? Defining a finalizer that immortalizes its object and can never run seems like an outright bug, not something that you should merely warn about in verbose mode only. ---------------------------------------- Feature #15974: Warn in verbose mode on defining a finalizer that captures the object https://bugs.ruby-lang.org/issues/15974#change-80421 * Author: chrisseaton (Chris Seaton) * Status: Closed * Priority: Normal * Assignee: * Target version: ---------------------------------------- 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:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>