Re: Final iteration lost?

Leam Hall <[email protected]> Sun, 11 Aug 2019 06:53:13 -0400
Newsgroups gmane.comp.lang.ruby.general
Message-ID <[email protected]>
On 8/8/19 3:59 PM, John W Higgins wrote:

> On Thu, Aug 8, 2019 at 4:07 AM Leam Hall <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     I'm parsing a data file with each_line, each section starts with a line
>     that ends in ")". Each section has 2-3 subsections, delimited by blank
>     lines. The original test for a new section was:
> 
>              if line.end_with?(')')
> 
> The better option here is to create a "job" and have it process the rows 
> as opposed to processing rows and then creating a job

John, just a quick reply on this. I'm still very much a Ruby beginner, 
your solution took me a couple reads to begin to understand. I think 
it's brilliant, and will work to understand it more.

Thank you for twisting my brain around!

Leam


Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>