Import patch to bugfix from Padrino Helpers

Padrino had an issue https://github.com/padrino/padrino-framework/issues/1582
which was solved at 72769fe39a (diff-526024418d0d573e08d46ba3d55c02bcR36)

This commit brings the same fix back into Middleman's method that
overrides Padrino's method.
This commit is contained in:
claudiob 2014-11-08 13:01:05 -08:00
parent ebe2164fe9
commit 9d49b08426

View file

@ -12,7 +12,7 @@ class Padrino::Helpers::OutputHelpers::ErbHandler
raw = block.call(*args)
captured = template.instance_variable_get(:@_out_buf)
self.output_buffer = _buf_was
engine_matches?(block) ? captured : raw
engine_matches?(block) && !captured.empty? ? captured : raw
end
end