lib/wordnik/response.rb in wordnik-0.3.7 vs lib/wordnik/response.rb in wordnik-0.3.8

- old
+ new

@@ -23,12 +23,12 @@ # If body is JSON, parse it # TODO: If body is XML, parse it # Otherwise return raw string def body - JSON.parse(raw.body) + JSON.parse raw.body.encode(::Encoding::UTF_8, undef: :replace) rescue - raw.body + raw.body.encode(::Encoding::UTF_8, undef: :replace) end def headers h = {} raw.headers_hash.each {|k,v| h[k] = v } \ No newline at end of file