2006/6/28, Louis J Scoras <louis.j.scoras / gmail.com>:
> Everything needs to be properly nested.  That is, you need to end the
> first do block before you can end the enclosed one.

Just adding to that: every IDE will have a hard time figuring out
*where* exactly you missed an end.  That's next to impossible.  For
example

foo.each do |x|
  x.each do |a|
    puts a
  end # assume this was missing
  puts x.size
end

No ide could guess whether the "end" was missing in the marked line or
in the line after "puts x.size" (which could be any other statement or
sequence of statements).

That's why Ruby usually complains at the end of the file.  A good way
to prevent this is to create the habit of entering all pairs
(brackets, if then end, do end etc.) immediately before entering the
code between them.  Or use an IDE that does it for you.

Kind regards

robert

-- 
Have a look: http://www.flickr.com/photos/fussel-foto/