Permalink
Browse files

Shush, rexml

  • Loading branch information...
1 parent 7e6652e commit c2018b4b7b50b1c4aa89ff61cf0099229c3669a1 @jeremy jeremy committed Sep 13, 2009
@@ -5,11 +5,11 @@
# Earlier versions of rexml defined REXML::Version, newer ones REXML::VERSION
unless (defined?(REXML::VERSION) ? REXML::VERSION : REXML::Version) > "3.1.7.2"
- require 'rexml/document'
+ silence_warnings { require 'rexml/document' }
# REXML in 1.8.7 has the patch but early patchlevels didn't update Version from 3.1.7.2.
unless REXML::Document.respond_to?(:entity_expansion_limit=)
- require 'rexml/entity'
+ silence_warnings { require 'rexml/entity' }
module REXML #:nodoc:
class Entity < Child #:nodoc:
@@ -24,7 +24,7 @@ def parse(data)
{}
else
data.ungetc(char)
- require 'rexml/document' unless defined?(REXML::Document)
+ silence_warnings { require 'rexml/document' } unless defined?(REXML::Document)
doc = REXML::Document.new(data)
merge_element!({}, doc.root)
end

0 comments on commit c2018b4

Please sign in to comment.