Even if you set the the option 'suppressempty' => true you will still receive this error when an empty value
is encountered:
ArgumentError (Use of uninitialized value!):
/opt/local/lib/ruby/gems/1.8/gems/xml-simple-1.0.12/lib/xmlsimple.rb:799:in `value_to_xml'
In fact, the logic the error appears to be incorrect. I have changed this to something a little more direct and it is
working.
Original line 797:
unless @options.has_key?('suppressempty') && @options['suppressempty'].nil?
Revised line 797:
unless @options['suppressempty'] == true
Obviously this could be reduced to "unless @options['suppressempty']" but it's not clear to me what the legitimate
values are for the supressempty option. |