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.
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs