summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--enum.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/enum.c b/enum.c
index 7dd1ae3..e9d5684 100644
--- a/enum.c
+++ b/enum.c
@@ -3213,9 +3213,10 @@ slicebefore_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
*
* # split mails in mbox (slice before Unix From line after an empty line)
* open("mbox") { |f|
- * f.slice_before(emp: true) { |line, h|
- * prevemp = h[:emp]
- * h[:emp] = line == "\n"
+ * emp = true
+ * f.slice_before { |line|
+ * prevemp = emp
+ * emp = line == "\n"
* prevemp && line.start_with?("From ")
* }.each { |mail|
* mail.pop if mail.last == "\n"