Project

General

Profile

Actions

Bug #12054

closed

Remove block from Logger.add as it's not needed

Added by eLobato (Daniel Lobato Garcia) almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Target version:
-
[ruby-core:73709]

Description

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).

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0