diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-13 20:51:51 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-13 20:51:51 -0700 |
commit | f3f34bce8fc2895e05c4a06bb4105d6155fa423d (patch) | |
tree | a73cb497a61f92ca04abfde4750b5b3e6e97d8f2 /activesupport/lib | |
parent | 86b02e7bb188a28e9b3c80b6d91af3219321e6fc (diff) | |
download | rails-f3f34bce8fc2895e05c4a06bb4105d6155fa423d.tar.gz rails-f3f34bce8fc2895e05c4a06bb4105d6155fa423d.tar.bz2 rails-f3f34bce8fc2895e05c4a06bb4105d6155fa423d.zip |
refactor delete a little
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/ordered_hash.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index 7f148dc853..4adfaecd4a 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -84,10 +84,7 @@ module ActiveSupport end def delete(key) - if has_key? key - index = @keys.index(key) - @keys.delete_at index - end + @keys.delete key if has_key? key super end |