lib/lastfm/response.rb in lastfm-1.27.2 vs lib/lastfm/response.rb in lastfm-1.27.3

- old
+ new

@@ -4,9 +4,10 @@ class Lastfm class Response attr_reader :xml def initialize(body) + # workaround for https://github.com/youpy/ruby-lastfm/issues/83 body = fix_body(body) @xml = XmlSimple.xml_in(body, 'ForceArray' => ['image', 'tag', 'user', 'event', 'correction']) rescue REXML::ParseException @xml = XmlSimple.xml_in(body.encode(Encoding.find("ISO-8859-1"), :undef => :replace),