Permalink
Browse files

Merge pull request #10041 from vipulnsward/more_destructive_merge

change merge to merge! in AS on new hashes
  • Loading branch information...
2 parents a18c9f0 + 1879690 commit 2a27485c68aba36c33897ae96f15fda9abb5a6a4 @spastorino spastorino committed Apr 2, 2013
@@ -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]
@@ -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]

0 comments on commit 2a27485

Please sign in to comment.