From: nagachika00@... Date: 2016-03-09T15:25:56+00:00 Subject: [ruby-core:74248] [Ruby trunk Bug#12054] Remove block from Logger.add as it's not needed Issue #12054 has been updated by Tomoyuki Chikanaga. Backport changed from 2.1: DONE, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: DONE, 2.2: DONE, 2.3: REQUIRED r53790 and r53844 were backported into `ruby_2_2` branch at r54072. ---------------------------------------- Bug #12054: Remove block from Logger.add as it's not needed https://bugs.ruby-lang.org/issues/12054#change-57382 * Author: Daniel Lobato Garcia * Status: Closed * Priority: Normal * Assignee: Daniel Lobato Garcia * ruby -v: * Backport: 2.1: DONE, 2.2: DONE, 2.3: REQUIRED ---------------------------------------- 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: