Re: Yet another question on exceptions

File.open is not that stupid ;-). It uses “ensure” internally to close
a file in the case of exception. Using block with open guarantees that
the file will not remain open no matter what.

Gennady.