From: naruse@... Date: 2016-03-29T05:58:00+00:00 Subject: [ruby-core:74657] [Ruby trunk Bug#12054] Remove block from Logger.add as it's not needed Issue #12054 has been updated by Yui NARUSE. Backport changed from 2.1: DONE, 2.2: DONE, 2.3: REQUIRED to 2.1: DONE, 2.2: DONE, 2.3: DONE ruby_2_3 r54362 merged revision(s) 53790,53844. ---------------------------------------- Bug #12054: Remove block from Logger.add as it's not needed https://bugs.ruby-lang.org/issues/12054#change-57784 * Author: Daniel Lobato Garcia * Status: Closed * Priority: Normal * Assignee: Daniel Lobato Garcia * ruby -v: * Backport: 2.1: DONE, 2.2: DONE, 2.3: DONE ---------------------------------------- Logger add (lib/logger.rb) takes as arguments severity, message, progname and &block The method runs the block through yield. In this case, we can just omit the argument and we'd be saving the instantiation of a new proc object (see http://mudge.name/2011/01/26/passing-blocks-in-ruby-without-block.html). -- https://bugs.ruby-lang.org/ Unsubscribe: