diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb index f66b968f..8d62391c 100644 --- a/lib/rexml/parsers/baseparser.rb +++ b/lib/rexml/parsers/baseparser.rb @@ -656,7 +656,7 @@ def parse_attributes(prefixes, curr_ns) prefixes << prefix unless prefix == "xml" end - if attributes.has_key?(name) + if attributes[name] msg = "Duplicate attribute #{name.inspect}" raise REXML::ParseException.new(msg, @source, self) end