"David Douthitt" <DDouthitt / cuna.com> writes:

>             next if comment?
                      ^
Should be:            line.comment?



> Now, what's this do:
> 
> next if line.comment?

I _think_ I was suggesting

  nonCommentLines(aFile) do |line|
   # process
  end

instead of

  aFile.each do |line|
    next if line.comment?
    # process
  end

It just seems to encapsulate the comment stripping in one place. If
you wanted to go the whole hog, you might do

   def nonCommentLines(anEnumerable)
     anEnumerable.each do |line|
       yield(line) unless line.comment?
     end
   end

Which then makes the detection of comment lines independent of the
stripping of them, and makes both separate from our application's core 
functionality.

Not a big deal...


Regards


Dave