liangzan/contacts — pull request #3 by mkonikowski (2012-03-01 12:02:17+00:00)
Title: Fix for ruby 1.9.3

Hi!

I fixed post/get errors. It looks like those methods were backwards compatible till 1.9.2, but since 1.9.3 they are not: http://ruby-doc.org/stdlib-1.9.2/libdoc/net/http/rdoc/Net/HTTP.html#method-i-post

"In version 1.1 (ruby 1.6), this method returns a pair of objects, a Net::HTTPResponse object and an entity body string. In version 1.2 (ruby 1.8), this method returns a Net::HTTPResponse object."

I replaced all occurrences of:

resp, data = http.post(args*)

by:

resp = http.post(args*)
data = resp.body

etc. It fixes nil data errors.

Regards,
Mateusz