diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 18:03:51 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 18:03:51 +0000 |
commit | ee827e52a7e953771d8339ab0a351699c775c8e4 (patch) | |
tree | 6bf4e45cd18e8ea3e09f2687b80a25e10604b195 /lib | |
parent | bbc50e2a2851ce3db6f0cb3ba50ee30fefb26a6c (diff) | |
download | ruby-ee827e52a7e953771d8339ab0a351699c775c8e4.tar.gz |
eliminate `shadowing outer local variable - name` warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rexml/parsers/baseparser.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb index b5b61c34dd..ebffdaa8c7 100644 --- a/lib/rexml/parsers/baseparser.rb +++ b/lib/rexml/parsers/baseparser.rb @@ -373,7 +373,7 @@ module REXML if md[4].size > 0 attrs = md[4].scan( ATTRIBUTE_PATTERN ) 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 local_part == "xml" if value != "http://www.w3.org/XML/1998/namespace" @@ -391,12 +391,12 @@ module REXML prefixes << prefix unless prefix == "xml" end - if attributes.has_key?(name) - msg = "Duplicate attribute #{name.inspect}" + if attributes.has_key?(attr_name) + msg = "Duplicate attribute #{attr_name.inspect}" raise REXML::ParseException.new(msg, @source, self) end - attributes[name] = value + attributes[attr_name] = value end end |