# File lib/haml/helpers/action_view_mods.rb, line 89
        def capture_with_haml(*args, &block)
          if Haml::Helpers.block_is_haml?(block)
            _hamlout = eval('_hamlout', block.binding) # Necessary since capture_haml checks _hamlout
            value = nil
            buffer = capture_haml(*args) { value = yield(*args) }
            str =
              if !buffer.empty?
                buffer
              elsif value.is_a?(String)
                value
              else
                ''
              end
            return ActionView::NonConcattingString.new(str) if defined?(ActionView::NonConcattingString)
            return str
          else
            capture_without_haml(*args, &block)
          end
        end