aboutsummaryrefslogtreecommitdiffstats
path: root/enumerator.c
diff options
context:
space:
mode:
authorzverok <zverok.offline@gmail.com>2019-12-22 22:56:44 +0200
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-23 08:36:58 +0900
commita4b99f97642d31fc8ddd537155ff6cf61be6a43c (patch)
treef524ab23300bdc901d82f5cd49e73299c9af5a23 /enumerator.c
parentc1bd1bf27236b33965dd92c1b2297edc91327cfb (diff)
downloadruby-a4b99f97642d31fc8ddd537155ff6cf61be6a43c.tar.gz
Fix typos of previous docs PR
In #2612 I made two typos (extra ,, and copy-pasted same line of code instead of showing two different ones), fixing them.
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enumerator.c b/enumerator.c
index 0aa395a8ba..e8ee9e5737 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -316,7 +316,7 @@ proc_entry_ptr(VALUE proc_entry)
* some_method(a.to_enum)
*
* # String#split in block form is more memory-effective:
- * very_large_string.to_enum(:split, "|") { |chunk| return chunk if chunk.include?('DATE') }
+ * very_large_string.split("|") { |chunk| return chunk if chunk.include?('DATE') }
* # This could be rewritten more idiomatically with to_enum:
* very_large_string.to_enum(:split, "|").lazy.grep(/DATE/).first
*