Skip to content

Commit b259df2

Browse files
committed
Don't overwrite XmlSimple.xml_in with FasterXmlSimple's version
FasterXmlSimple#xml_in isn't 100% compatible with XmlSimple#xml_in. This can cause unexpected results when both libraries are being used. Since we're bundling FasterXmlSimple (and not relying on gems) we can fix it in place.
1 parent cd679c6 commit b259df2

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

lib/aws/s3.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
# have to use a version greater than '0.3.8.2'.
5555
raise LoadError unless XML::Parser::VERSION > '0.3.8.2'
5656
$:.push(File.join(File.dirname(__FILE__), '..', '..', 'support', 'faster-xml-simple', 'lib'))
57-
require_library_or_gem 'faster_xml_simple'
57+
require 'faster_xml_simple'
5858
FasterXmlSimple
5959
rescue LoadError
6060
XmlSimple

support/faster-xml-simple/lib/faster_xml_simple.rb

+8-5
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,11 @@ def parse(string)
180180
end
181181
end
182182

183-
class XmlSimple # :nodoc:
184-
def self.xml_in(*args)
185-
FasterXmlSimple.xml_in *args
186-
end
187-
end
183+
# Don't overwrite XmlSimple.xml_in since FasterXmlSimple's implementation isn't
184+
# 100% compatible.
185+
#
186+
# class XmlSimple # :nodoc:
187+
# def self.xml_in(*args)
188+
# FasterXmlSimple.xml_in *args
189+
# end
190+
# end

0 commit comments

Comments
 (0)