• +91 9723535972
  • info@interviewmaterial.com

Ruby Interview Questions and Answers

Question - Explain the use of retry statement in Ruby?

Answer -

Usaually in a rescue clause, the exception is captured and code resumes after begin block. Using retry statement, the rescue block code can be resumed from begin after capturing an exception.

Syntax:

begin  
code....  
rescue  
# capture exceptions  
retry # program will run from the begin block  
end  

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners