3 ms·
> But I can't even close an open file handle after a break. Yes, you can. That's what ensure (the Ruby equivalent of "finally") is for. Or, better using File.o
by dragonwriter 1y ago
> But I can't even close an open file handle after a break.
Yes, you can. That's what ensure (the Ruby equivalent of "finally") is for. Or, better using File.open with a block where you do the work, which uses ensure under the hood.