Skip to content

Commit

Permalink
Net::HTTPHeader#each_header when passed no block returns an Enumerator
Browse files Browse the repository at this point in the history
  • Loading branch information
p8 committed Oct 8, 2011
1 parent 348136d commit 7307b2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/net/http.rb
Expand Up @@ -1214,6 +1214,7 @@ def fetch(key, *args, &block) #:yield: +key+

# Iterates for each header names and values.
def each_header #:yield: +key+, +value+
return to_enum(__method__) unless block_given?
@header.each do |k,va|
yield k, va.join(', ')
end
Expand Down

0 comments on commit 7307b2d

Please sign in to comment.