mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
refactor delete a little
This commit is contained in:
parent
86b02e7bb1
commit
f3f34bce8f
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue