mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use the REXML parser by default. XmlMini.backend = 'LibXML' to use libxml-ruby.
This commit is contained in:
parent
87d82ef76e
commit
4458edc882
1 changed files with 5 additions and 6 deletions
|
@ -1,5 +1,9 @@
|
|||
module ActiveSupport
|
||||
# = XmlMini
|
||||
#
|
||||
# To use the much faster libxml parser:
|
||||
# gem 'libxml-ruby', '=0.9.7'
|
||||
# XmlMini.backend = 'LibXML'
|
||||
module XmlMini
|
||||
extend self
|
||||
delegate :parse, :to => :@backend
|
||||
|
@ -10,10 +14,5 @@ module ActiveSupport
|
|||
end
|
||||
end
|
||||
|
||||
begin
|
||||
gem 'libxml-ruby', '=0.9.4', '=0.9.7'
|
||||
XmlMini.backend = 'LibXML'
|
||||
rescue Gem::LoadError
|
||||
XmlMini.backend = 'REXML'
|
||||
end
|
||||
XmlMini.backend = 'REXML'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue