lib/mixpanel/tracker.rb in mixpanel-4.0.7 vs lib/mixpanel/tracker.rb in mixpanel-4.0.8
- old
+ new
@@ -66,10 +66,14 @@
Net::HTTP.post_form(URI.parse(url), data)
end
end
def parse_response(response)
- response.body.to_i == 1
+ if response.respond_to?(:body)
+ response.body.to_i == 1
+ else
+ response.to_i == 1
+ end
end
def send_async(url, data)
w = Mixpanel::Tracker.worker
begin