Actions
Bug #12054
closedRemove block from Logger.add as it's not needed
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).
Updated by sonots (Naotoshi Seo) over 8 years ago
- Status changed from Open to Closed
Applied in changeset r53790.
- lib/logger.rb: Remove block from Logger.add as it's not needed
patch provided by Daniel Lobato GarcĂ [fix GH-1240] [Bug #12054]
Updated by usa (Usaku NAKAMURA) over 8 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
Updated by usa (Usaku NAKAMURA) over 8 years ago
- Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: DONE, 2.2: REQUIRED, 2.3: REQUIRED
ruby_2_1 r53938 merged revision(s) 53790,53844.
Updated by nagachika (Tomoyuki Chikanaga) over 8 years ago
- 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.
Updated by naruse (Yui NARUSE) over 8 years ago
- 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.
Actions
Like0
Like0Like0Like0Like0Like0