Skip to content
Browse files

Merge branch 'myronmarston/net_http_response_refactoring2'

Conflicts:
	lib/webmock/http_lib_adapters/net_http_response.rb
  • Loading branch information...
2 parents e729165 + f3cf8a2 commit 2970504b6e12bb4b104742cd71022436cc48e4c2 @bblimke committed Sep 12, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/webmock/http_lib_adapters/net_http_response.rb
View
1 lib/webmock/http_lib_adapters/net_http_response.rb
@@ -18,6 +18,7 @@ def read_body(dest = nil, &block)
return super if @__read_body_previously_called
return @body if dest.nil? && block.nil?
raise ArgumentError.new("both arg and block given for HTTP method") if dest && block
+ return nil if @body.nil?
dest ||= ::Net::ReadAdapter.new(block)
dest << @body

0 comments on commit 2970504

Please sign in to comment.
Something went wrong with that request. Please try again.