Abort instead of exit in Ruby

Are you familiar with this code?

if error?
  puts "Sorry, error occured..."
  exit 1
end

Just replace that with:

abort "Sorry, error occured..." if error?

Simple and beautiful.

Last modified: 20-Jan-23