Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #10041 from vipulnsward/more_destructive_merge

change merge to merge! in AS on new hashes
  • Loading branch information...
commit 2a27485c68aba36c33897ae96f15fda9abb5a6a4 2 parents a18c9f0 + 1879690
@spastorino spastorino authored
View
2  activesupport/lib/active_support/xml_mini/libxmlsax.rb
@@ -32,7 +32,7 @@ def on_end_document
end
def on_start_element(name, attrs = {})
- new_hash = { CONTENT_KEY => '' }.merge(attrs)
+ new_hash = { CONTENT_KEY => '' }.merge!(attrs)
new_hash[HASH_SIZE_KEY] = new_hash.size + 1
case current_hash[name]
View
2  activesupport/lib/active_support/xml_mini/nokogirisax.rb
@@ -38,7 +38,7 @@ def error(error_message)
end
def start_element(name, attrs = [])
- new_hash = { CONTENT_KEY => '' }.merge(Hash[attrs])
+ new_hash = { CONTENT_KEY => '' }.merge!(Hash[attrs])
new_hash[HASH_SIZE_KEY] = new_hash.size + 1
case current_hash[name]
Please sign in to comment.
Something went wrong with that request. Please try again.