aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/ordered_hash.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb
index 4adfaecd4a..7f148dc853 100644
--- a/activesupport/lib/active_support/ordered_hash.rb
+++ b/activesupport/lib/active_support/ordered_hash.rb
@@ -84,7 +84,10 @@ module ActiveSupport
end
def delete(key)
- @keys.delete key if has_key? key
+ if has_key? key
+ index = @keys.index(key)
+ @keys.delete_at index
+ end
super
end