Permalink
Browse files

Add conditional check so we don't get an exception for a nil body.

  • Loading branch information...
1 parent db348c3 commit 1678b3f51d619e4d5e6f63fa9f698fd26b10c45c @myronmarston committed Jul 6, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/vcr/structs.rb
View
@@ -54,7 +54,7 @@ def initialize(*args)
# or attributes, so that it is serialized to YAML as a raw string.
# This is needed for rest-client. See this ticket for more info:
# http://github.com/myronmarston/vcr/issues/4
- self.body = String.new(body)
+ self.body = String.new(body) if body
end
def self.from_net_http_response(response)

0 comments on commit 1678b3f

Please sign in to comment.