Begin rescue and ensure in Ruby?

Posted by Editorial Staff | Updated on

In this example, we have shared begin rescue and ensure in Ruby?Yes, ensure ensures that the code is always evaluated. That’s why it’s called ensure. So, it is equivalent to Java’s and C#’s finally.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers