summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Stollsteimer <sto.mar@web.de>2019-05-18 11:05:26 (GMT)
committerMarcus Stollsteimer <sto.mar@web.de>2019-05-18 11:05:26 (GMT)
commitf782e5bdcf91f2885519e20e3aa53eec063faea8 (patch)
tree34ffb7d00c65dfeb466f9789d56ea869334b47e8
parentacf6689a8c77b5730274e2c9ec1d49423674da15 (diff)
[DOC] Use '&&' instead of 'and' in boolean expression
-rw-r--r--enum.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/enum.c b/enum.c
index 906a13e..d754005 100644
--- a/enum.c
+++ b/enum.c
@@ -281,12 +281,12 @@ find_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
* (1..100).detect #=> #<Enumerator: 1..100:detect>
* (1..100).find #=> #<Enumerator: 1..100:find>
*
- * (1..10).detect { |i| i % 5 == 0 and i % 7 == 0 } #=> nil
- * (1..10).find { |i| i % 5 == 0 and i % 7 == 0 } #=> nil
- * (1..10).detect(-> {0}) { |i| i % 5 == 0 and i % 7 == 0 } #=> 0
- * (1..10).find(-> {0}) { |i| i % 5 == 0 and i % 7 == 0 } #=> 0
- * (1..100).detect { |i| i % 5 == 0 and i % 7 == 0 } #=> 35
- * (1..100).find { |i| i % 5 == 0 and i % 7 == 0 } #=> 35
+ * (1..10).detect { |i| i % 5 == 0 && i % 7 == 0 } #=> nil
+ * (1..10).find { |i| i % 5 == 0 && i % 7 == 0 } #=> nil
+ * (1..10).detect(-> {0}) { |i| i % 5 == 0 && i % 7 == 0 } #=> 0
+ * (1..10).find(-> {0}) { |i| i % 5 == 0 && i % 7 == 0 } #=> 0
+ * (1..100).detect { |i| i % 5 == 0 && i % 7 == 0 } #=> 35
+ * (1..100).find { |i| i % 5 == 0 && i % 7 == 0 } #=> 35
*
*/
@@ -350,9 +350,9 @@ find_index_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
*
* If neither block nor argument is given, an enumerator is returned instead.
*
- * (1..10).find_index { |i| i % 5 == 0 and i % 7 == 0 } #=> nil
- * (1..100).find_index { |i| i % 5 == 0 and i % 7 == 0 } #=> 34
- * (1..100).find_index(50) #=> 49
+ * (1..10).find_index { |i| i % 5 == 0 && i % 7 == 0 } #=> nil
+ * (1..100).find_index { |i| i % 5 == 0 && i % 7 == 0 } #=> 34
+ * (1..100).find_index(50) #=> 49
*
*/