Forum: Ruby Re: Yet another question on exceptions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Gennady B. (Guest)
on 2006-02-10 18:10
(Received via mailing list) 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.

This topic is locked and can not be replied to.