diff --git a/lib/haml/template.rb b/lib/haml/template.rb index 4ed061b39b..806c997838 100644 --- a/lib/haml/template.rb +++ b/lib/haml/template.rb @@ -54,7 +54,7 @@ def precompiled_method_return_value_with_haml_xss # Patching was necessary for versions <= 2.0.1, # but we can make it a normal handler for higher versions. if defined?(ActionView::TemplateHandler) || - (defined?(ActionView::Template) && defined?(ActionView::Template::Handlers)) + (defined?(ActionView::Template) && defined?(ActionView::Template::Handler)) require 'haml/template/plugin' else require 'haml/template/patch'