From eb1e034734410a5b60b8296d5edc0f80ee5dcca9 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sun, 28 Dec 2008 14:46:31 -0800 Subject: [PATCH] Use _erbout rather than _hamlout.buffer for :ugly to avoid method-call costs. --- lib/haml/precompiler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/haml/precompiler.rb b/lib/haml/precompiler.rb index 48575e25..c8d970f3 100644 --- a/lib/haml/precompiler.rb +++ b/lib/haml/precompiler.rb @@ -285,7 +285,7 @@ END @precompiled << if @options[:ugly] - "_hamlout.buffer << #{unescape_interpolation(text)};" + "_erbout << #{unescape_interpolation(text)};" else "_hamlout.push_text(#{unescape_interpolation(text)}, #{tab_change}, #{@dont_tab_up_next_text.inspect});" end @@ -338,7 +338,7 @@ END push_silent "haml_temp = #{text}" newline_now - push_and_tabulate([:loud, "_hamlout.buffer << #{no_format ? 'haml_temp' : out}"]) + push_and_tabulate([:loud, "_erbout << #{no_format ? 'haml_temp' : out}"]) end # Causes text to be evaluated, and Haml::Helpers#find_and_flatten