lib/xmlsimple.rb in xml-simple-1.0.12 vs lib/xmlsimple.rb in xml-simple-1.0.13
- old
+ new
@@ -9,11 +9,11 @@
# Easy API to maintain XML (especially configuration files).
class XmlSimple
include REXML
- @@VERSION = '1.0.12'
+ @@VERSION = '1.0.13'
# A simple cache for XML documents that were already transformed
# by xml_in.
class Cache
# Creates and initializes a new Cache object.
@@ -790,10 +790,10 @@
result << indent << '<' << name
end
if !ref.empty?
ref.each { |key, value|
- next if !key.nil? && key[0, 1] == '-'
+ next if !key.nil? && key.to_s[0, 1] == '-'
if value.nil?
unless @options.has_key?('suppressempty') && @options['suppressempty'].nil?
raise ArgumentError, "Use of uninitialized value!"
end
value = {}