$ ./guess_the_languageProgramming Languages
Programming Languages · hard · #555

Which programming language is this?

def fetch(retries: 3)
  yield
rescue Timeout::Error
  retries -= 1
  retry if retries.positive?
end

Answer: Ruby

A method-level rescue that calls retry, plus yield and a trailing if modifier, is distinctly Ruby.
Play Programming Languages ▸