Permalink
Browse files

use tap with block parameter

  • Loading branch information...
1 parent f71467a commit 02902e00ab9fc67812accf72d61847c65cd25615 @amatsuda amatsuda committed Jan 18, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/rails/info.rb
@@ -46,7 +46,7 @@ def to_s
alias inspect to_s
def to_html
- (table = '<table>').tap do
+ '<table>'.tap do |table|
properties.each do |(name, value)|
table << %(<tr><td class="name">#{CGI.escapeHTML(name.to_s)}</td>)
formatted_value = if value.kind_of?(Array)

0 comments on commit 02902e0

Please sign in to comment.