-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unify the code for filter methods (and speed up
#reject!
)
the worst case for `Array#reject!` (i.e. a proc always returning `true`) is at least 5x worse than the worst case for `Array#select!` (proc always returning `false`) this commit unifies these implementations and inlines the (effective) call of `#select!` in `#keep_if` and `#reject!` in `#delete_if`
- Loading branch information
Showing
1 changed file
with
28 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters