eliminate shadowing outer local variable - name
warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bbc50e2a28
commit
ee827e52a7
@ -373,7 +373,7 @@ module REXML
|
|||||||
if md[4].size > 0
|
if md[4].size > 0
|
||||||
attrs = md[4].scan( ATTRIBUTE_PATTERN )
|
attrs = md[4].scan( ATTRIBUTE_PATTERN )
|
||||||
raise REXML::ParseException.new( "error parsing attributes: [#{attrs.join ', '}], excess = \"#$'\"", @source) if $' and $'.strip.size > 0
|
raise REXML::ParseException.new( "error parsing attributes: [#{attrs.join ', '}], excess = \"#$'\"", @source) if $' and $'.strip.size > 0
|
||||||
attrs.each do |name, prefix, local_part, quote, value|
|
attrs.each do |attr_name, prefix, local_part, quote, value|
|
||||||
if prefix == "xmlns"
|
if prefix == "xmlns"
|
||||||
if local_part == "xml"
|
if local_part == "xml"
|
||||||
if value != "http://www.w3.org/XML/1998/namespace"
|
if value != "http://www.w3.org/XML/1998/namespace"
|
||||||
@ -391,12 +391,12 @@ module REXML
|
|||||||
prefixes << prefix unless prefix == "xml"
|
prefixes << prefix unless prefix == "xml"
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes.has_key?(name)
|
if attributes.has_key?(attr_name)
|
||||||
msg = "Duplicate attribute #{name.inspect}"
|
msg = "Duplicate attribute #{attr_name.inspect}"
|
||||||
raise REXML::ParseException.new(msg, @source, self)
|
raise REXML::ParseException.new(msg, @source, self)
|
||||||
end
|
end
|
||||||
|
|
||||||
attributes[name] = value
|
attributes[attr_name] = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user