diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-03-05 13:15:41 -0800 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-03-05 13:15:41 -0800 |
commit | 9e43ce5a2b099d8c92713e4f4fff902f0e6a474a (patch) | |
tree | af0d556bb0750fdd0aa8f1fafad2ae2641bf1696 /actionpack | |
parent | 6ea48ebfa68947ad66a516bdb7452e0faf3f70a7 (diff) | |
parent | 8a189d01040f52feade68e58038d3e2ea09be202 (diff) | |
download | rails-9e43ce5a2b099d8c92713e4f4fff902f0e6a474a.tar.gz rails-9e43ce5a2b099d8c92713e4f4fff902f0e6a474a.tar.bz2 rails-9e43ce5a2b099d8c92713e4f4fff902f0e6a474a.zip |
Merge pull request #9573 from robertomiranda/useless_gsub
Use gsub intead of tr when the to_str is longer than the from_str
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/debug_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/debug_helper.rb b/actionpack/lib/action_view/helpers/debug_helper.rb index db7f9f3494..c29c1b1eea 100644 --- a/actionpack/lib/action_view/helpers/debug_helper.rb +++ b/actionpack/lib/action_view/helpers/debug_helper.rb @@ -28,7 +28,7 @@ module ActionView # </pre> def debug(object) Marshal::dump(object) - object = ERB::Util.html_escape(object.to_yaml).tr(" ", " ").html_safe + object = ERB::Util.html_escape(object.to_yaml).gsub(" ", " ").html_safe content_tag(:pre, object, :class => "debug_dump") rescue Exception # errors from Marshal or YAML # Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback |