vendor/rails/activesupport/lib/active_support/ordered_hash.rb in radiant-0.8.2 vs vendor/rails/activesupport/lib/active_support/ordered_hash.rb in radiant-0.9.0.rc2
- old
+ new
@@ -118,9 +118,16 @@
def merge(other_hash)
dup.merge!(other_hash)
end
+ # When replacing with another hash, the initial order of our keys must come from the other hash -ordered or not.
+ def replace(other)
+ super
+ @keys = other.keys
+ self
+ end
+
def inspect
"#<OrderedHash #{super}>"
end
private