Skip to content

Commit edf22c1

Browse files
author
Bozhidar Batsov
committed
fixed #78 - use _ as a variable placeholder
1 parent 058bc63 commit edf22c1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,16 @@ syntax.
511511
lambda.(1, 2)
512512
```
513513
514+
* Use `_` for unused block parameters.
515+
516+
```Ruby
517+
# bad
518+
result = hash.map { |k, v| v + 1 }
519+
520+
# good
521+
result = hash.map { |_, v| v + 1 }
522+
```
523+
514524
## Naming
515525
516526
> The only real difficulties in programming are cache invalidation and

0 commit comments

Comments
 (0)