aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-01-18 17:04:13 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-01-18 17:12:47 +0900
commit02902e00ab9fc67812accf72d61847c65cd25615 (patch)
tree03febabf0e4dda353350834967bd093e2862ef68
parentf71467ac605f2bd3fec08fe35c7d548b35ffb0cc (diff)
downloadrails-02902e00ab9fc67812accf72d61847c65cd25615.tar.gz
rails-02902e00ab9fc67812accf72d61847c65cd25615.tar.bz2
rails-02902e00ab9fc67812accf72d61847c65cd25615.zip
use tap with block parameter
-rw-r--r--railties/lib/rails/info.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/info.rb b/railties/lib/rails/info.rb
index aacc1be2fc..592e74726e 100644
--- a/railties/lib/rails/info.rb
+++ b/railties/lib/rails/info.rb
@@ -46,7 +46,7 @@ module Rails
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)