I found the solution here. It's all about monkey patching.
I prefer this variation, as it keeps the options already set for Haml::Template. Put this at the end of your haml initializer.
class Tilt::HamlTemplate
def prepare
options = @options.merge(:filename => eval_file, :line => line)
# Use same options as Haml::Template
options = options.merge Haml::Template.options
@engine = ::Haml::Engine.new(data, options)
end
end