aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2014-12-15 21:20:54 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2014-12-15 21:20:54 -0200
commite4627edf87a1f0cb575287f200df3f67335dd84c (patch)
tree96a7d45075bc3a03219a16533232d86e6a4c1aab /actionview/lib/action_view
parent488aefe7426bbd6f071019dff4c4cd1fbfd56742 (diff)
downloadrails-e4627edf87a1f0cb575287f200df3f67335dd84c.tar.gz
rails-e4627edf87a1f0cb575287f200df3f67335dd84c.tar.bz2
rails-e4627edf87a1f0cb575287f200df3f67335dd84c.zip
Revert "Re-enable capture'ing non-String values"
This reverts commit c2fe0938d7201d4ce0bb2f25e72bf5f70df128af.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r--actionview/lib/action_view/helpers/capture_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/capture_helper.rb b/actionview/lib/action_view/helpers/capture_helper.rb
index 7884e4f1f1..75d1634b2e 100644
--- a/actionview/lib/action_view/helpers/capture_helper.rb
+++ b/actionview/lib/action_view/helpers/capture_helper.rb
@@ -36,7 +36,7 @@ module ActionView
def capture(*args)
value = nil
buffer = with_output_buffer { value = yield(*args) }
- if string = buffer.presence || value
+ if string = buffer.presence || value and string.is_a?(String)
ERB::Util.html_escape string
end
end