Skip to content

Commit 3e0443e

Browse files
committed
Make it possible to load either rexml or nokogiri
1 parent 5ebbafd commit 3e0443e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/dbus/xml.rb

+8-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@
1212
# See the file "COPYING" for the exact licensing terms.
1313

1414
# TODO: check if it is slow, make replaceable
15-
require "rexml/document"
15+
# make it possible to load either rexml or nokogiri
1616
begin
17-
require "nokogiri"
17+
require "rexml/document"
1818
rescue LoadError
19+
require "nokogiri"
20+
else
21+
begin
22+
require "nokogiri"
23+
rescue LoadError
24+
end
1925
end
2026

2127
module DBus

0 commit comments

Comments
 (0)