lib/sinatra/content_for.rb in sinatra-contrib-3.0.1 vs lib/sinatra/content_for.rb in sinatra-contrib-3.0.2

- old
+ new

@@ -173,10 +173,10 @@ # # Would pass <tt>1</tt> and <tt>2</tt> to all the blocks registered # for <tt>:head</tt>. def yield_content(key, *args, &block) if block_given? && !content_for?(key) - haml? && Tilt[:haml] == Tilt::HamlTemplate ? capture_haml(*args, &block) : yield(*args) + haml? && Tilt[:haml] == Tilt::HamlTemplate && respond_to?(:capture_haml) ? capture_haml(*args, &block) : yield(*args) else content = content_blocks[key.to_sym].map { |b| capture(*args, &b) } content.join.tap do |c| if block_given? && (erb? || erubi?) @_out_buf << c