ruby-changes:15145
From: akr <ko1@a...>
Date: Tue, 23 Mar 2010 23:00:18 +0900 (JST)
Subject: [ruby-changes:15145] Ruby:r27023 (trunk): update doc.
akr 2010-03-23 22:59:16 +0900 (Tue, 23 Mar 2010) New Revision: 27023 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27023 Log: update doc. Modified files: trunk/enum.c Index: enum.c =================================================================== --- enum.c (revision 27022) +++ enum.c (revision 27023) @@ -2489,6 +2489,7 @@ * i = mail.index("\n") * header = mail[0...i] * body = mail[(i+1)..-1] + * body.pop if body.last == "\n" * fields = header.slice_before {|line| !" \t".include?(line[0]) }.to_a * p unix_from * pp fields @@ -2499,11 +2500,13 @@ * # 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" - * prevemp && line.start_with?("From ") - * }.each {|mail| - * pp mail + * prevemp = h[:emp] + * h[:emp] = line == "\n" + * prevemp && line.start_with?("From ") + * }.each {|mail| + * mail.pop if mail.last == "\n" + * pp mail + * } * } * */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/