diff --git a/lib/haml/helpers/action_view_mods.rb b/lib/haml/helpers/action_view_mods.rb index 0eb3e2b1..2ade335c 100644 --- a/lib/haml/helpers/action_view_mods.rb +++ b/lib/haml/helpers/action_view_mods.rb @@ -86,7 +86,7 @@ if defined?(ActionView) and not defined?(Merb::Plugins) else module CaptureHelper def capture_with_haml(*args, &block) - if is_haml? + if is_haml? && block_is_haml?(block) capture_haml(*args, &block) else capture_without_haml(*args, &block)