Skip to content

Commit

Permalink
Merge pull request #820 from kymmt90/patch-1
Browse files Browse the repository at this point in the history
Avoid a mixture of Array#filter and Array#select
  • Loading branch information
pocke authored Nov 7, 2021
2 parents 9bd875c + ea67395 commit 9c43ce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rbs_by_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ end

```ruby
# .rb
[1,2,3,4,5].select {|num| num.even? }
[1,2,3,4,5].filter {|num| num.even? }
# => [2, 4]
%w[ a b c d e f ].select {|v| v =~ /[aeiou]/ }
%w[ a b c d e f ].filter {|v| v =~ /[aeiou]/ }
# => ["a", "e"]
[1,2,3,4,5].filter
```
Expand Down

0 comments on commit 9c43ce0

Please sign in to comment.