Ruby - Error Handling
You want to open a file, write data, and always close it even if an error occurs. Which Ruby code correctly uses
ensure for this cleanup?ensure for this cleanup?begin, writes inside, and closes in ensure, guaranteeing closure.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions