Skip to content

Commit

Permalink
Do not override :save_with if it is provided. Fixes #505
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Nov 17, 2011
1 parent 9ed7f8b commit 289000b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/nokogiri/xml/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,7 @@ def to_html options = {}
#
# See Node#write_to for a list of +options+
def to_xml options = {}
options[:save_with] |= SaveOptions::DEFAULT_XML if options[:save_with]
options[:save_with] = SaveOptions::DEFAULT_XML unless options[:save_with]
options[:save_with] ||= SaveOptions::DEFAULT_XML
serialize(options)
end

Expand Down

0 comments on commit 289000b

Please sign in to comment.