This project is archived and is in readonly mode.

#3205 ✓stale
codebrulee

[PATCH] Fix Hash#from_xml with empty hash (using REXML backend)

Reported by codebrulee | September 15th, 2009 @ 04:11 AM

Prior to XmlMini, the following behavior existed:

Hash.from_xml({}.to_xml) # => {"hash"=>nil}

Currently, however, this is what happens when using REXML (Nokogiri works correctly):

Hash.from_xml({}.to_xml) # => {"hash"=>"\n"}

The attached patch fixes this issue.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages