aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-10-15 10:23:05 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-10-15 10:23:05 -0700
commiteaa7605e2f0f96bc04d08955e3903af6a8d304e1 (patch)
treed419b707dbd3e8659c123ad34c3ba75442c04dfb /activesupport
parentb0157f8d045952930b683bc749610328840a61bf (diff)
downloadrails-eaa7605e2f0f96bc04d08955e3903af6a8d304e1.tar.gz
rails-eaa7605e2f0f96bc04d08955e3903af6a8d304e1.tar.bz2
rails-eaa7605e2f0f96bc04d08955e3903af6a8d304e1.zip
Revert "refactor delete a little"
This reverts commit f3f34bce8fc2895e05c4a06bb4105d6155fa423d.
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