1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides
bogdanvlviv 77b0126054
Add Array#extract!
The method removes and returns the elements for which the block returns a true value.
If no block is given, an Enumerator is returned instead.

```
numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
odd_numbers = numbers.extract! { |number| number.odd? } # => [1, 3, 5, 7, 9]
numbers # => [0, 2, 4, 6, 8]
```
2018-08-14 19:53:12 +03:00
..
assets Change the background color which wrapped by code tag. [ci skip] 2018-07-19 09:49:35 +08:00
bug_report_templates Update bug report templates 2018-04-10 04:32:42 +03:00
rails_guides Enable Start/EndWith and RegexpMatch cops 2018-07-28 17:37:17 -04:00
source Add Array#extract! 2018-08-14 19:53:12 +03:00
.document
CHANGELOG.md Remove changelog header for unreleased version 2018-03-13 15:20:57 -04:00
rails_guides.rb Use frozen string literal in guides/ 2017-08-13 22:04:09 +09:00
Rakefile Enable Start/EndWith and RegexpMatch cops 2018-07-28 17:37:17 -04:00
w3c_validator.rb Use frozen string literal in guides/ 2017-08-13 22:04:09 +09:00