lib/tilt/template.rb in tilt-1.4.0 vs lib/tilt/template.rb in tilt-1.4.1

- old
+ new

@@ -192,10 +192,13 @@ source.force_encoding(template_encoding) template.force_encoding(template_encoding) end - source << preamble << "\n" << template << "\n" << postamble + # https://github.com/rtomayko/tilt/issues/193 + warn "precompiled_preamble should return String (not Array)" if preamble.is_a?(Array) + warn "precompiled_postamble should return String (not Array)" if postamble.is_a?(Array) + source << [preamble, template, postamble].join("\n") [source, preamble.count("\n")+1] end # A string containing the (Ruby) source code for the template. The