Permalink
Browse files

reformat json parsing statement to fit 80 char limit

  • Loading branch information...
1 parent 60a8510 commit 2ada2bc3ea9719d15067fa11c70668fd1f3d261c @andrewmbenton andrewmbenton committed Jul 29, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/twilio-ruby/rest/client.rb
@@ -218,7 +218,9 @@ def connect_and_send(request) # :doc:
rescue Exception
if retries_left > 0 then retries_left -= 1; retry else raise end
end
- object = MultiJson.load response.body unless response.body.nil? || response.body.empty?
+ if response.body and !response.body.empty?
+ object = MultiJson.load response.body
+ end
if response.kind_of? Net::HTTPClientError
raise Twilio::REST::RequestError.new object['message'], object['code']
end

0 comments on commit 2ada2bc

Please sign in to comment.