lib/protocol/http/headers.rb in protocol-http-0.22.5 vs lib/protocol/http/headers.rb in protocol-http-0.22.6

- old
+ new

@@ -106,14 +106,12 @@ @tail != nil end # Record the current headers, and prepare to receive trailer. def trailer!(&block) - return nil unless self.include?(TRAILER) - @tail ||= @fields.size - return to_enum(:trailer!) unless block_given? + return to_enum(:trailer) unless block_given? if @tail @fields.drop(@tail).each(&block) end end