We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97cef51 commit c8313e8Copy full SHA for c8313e8
README.md
@@ -948,6 +948,22 @@ you if you forget either of the rules above!
948
p = proc { |n| puts n }
949
```
950
951
+* Prefer `proc.call()` over `proc[]` or `proc.()` for both lambdas and procs.
952
+
953
+ ```Ruby
954
+ # bad - looks similar to Enumeration access
955
+ l = ->(v) { puts v }
956
+ l[1]
957
958
+ # also bad - uncommon syntax
959
960
+ l.(1)
961
962
+ # good
963
964
+ l.call(1)
965
+ ```
966
967
* Use `_` for unused block parameters.
968
969
```Ruby
0 commit comments