From eaa7605e2f0f96bc04d08955e3903af6a8d304e1 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 15 Oct 2010 10:23:05 -0700 Subject: Revert "refactor delete a little" This reverts commit f3f34bce8fc2895e05c4a06bb4105d6155fa423d. --- activesupport/lib/active_support/ordered_hash.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/ordered_hash.rb') 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 -- cgit v1.2.3