lib/xml/mixup.rb in xml-mixup-0.1.1 vs lib/xml/mixup.rb in xml-mixup-0.1.2

- old
+ new

@@ -253,10 +253,14 @@ # supplant with attributes if present pub ||= attr[:public] if attr[:public] sys ||= attr[:system] if attr[:system] # XXX for some reason this is an *internal* subset? - node = doc.create_internal_subset(root, pub.to_s, sys.to_s) + # anyway these may not be strings and upstream is not forgiving + node = doc.create_internal_subset(root.to_s, + pub.nil? ? pub : pub.to_s, + sys.nil? ? sys : sys.to_s) + # at any rate it doesn't have to be explicitly attached # attach it to the document #doc.add_child node