The tilt signature only allows template content *or* a template
filename, not both. As a result, if you read the contents of a template
before it is passed to tilt (e.g. to get the metadata out) and there's
an error in the template it will only show up as '(__TEMPLATE__)' in the
backtrace (which is confusing and unnecessary).
With this patch the signature of the tilt method is changed to include
the content and/or the filename, allowing Tilt to include the filname in
a possible backtrace.
Without patch:
- Creating 'output'
(__TEMPLATE__):5:in `evaluate_source': undefined local variable or method `example' for #<Object:0x8bd8410> (NameError)
from /var/lib/gems/1.9.1/gems/tilt-0.9/lib/tilt.rb:254:in `instance_eval'
...
With patch:
- Creating 'output'
/tmp/frank/dynamic/_top.haml:5:in `evaluate_source': undefined local variable or method `example' for #<Object:0x9564470> (NameError)
from /var/lib/gems/1.9.1/gems/tilt-0.9/lib/tilt.rb:254:in `instance_eval'
...