Skip to content

Commit

Permalink
Merge pull request #76 from josephgrossberg/patch-1
Browse files Browse the repository at this point in the history
preferred syntax
MarcosX authored Aug 14, 2017
2 parents f5981ba + f535c88 commit 8cd60c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion idiomatic_ruby/collect_vs_select.md
Original file line number Diff line number Diff line change
@@ -14,6 +14,6 @@ select : Elements can be selected from an array according to criteria defined in
```ruby
arr = (1..10).to_a
# => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
arr.select{ |num| num.even? }
arr.select(&:even?)
# => [2, 4, 6, 8, 10]
```

0 comments on commit 8cd60c7

Please sign in to comment.