module ActionView::Helpers::CaptureHelper
def capture_with_haml(*args, &block)
def capture_with_haml(*args, &block) if Haml::Helpers.block_is_haml?(block) #double assignment is to avoid warnings _hamlout = _hamlout = eval('_hamlout', block.binding) # Necessary since capture_haml checks _hamlout str = capture_haml(*args, &block) # NonCattingString is present in Rails less than 3.1.0. When support # for 3.0 is dropped, this can be removed. return ActionView::NonConcattingString.new(str) if str && defined?(ActionView::NonConcattingString) return str else capture_without_haml(*args, &block) end end