Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Created January 1, 2011 14:40
Show Gist options
  • Select an option

  • Save edipofederle/761786 to your computer and use it in GitHub Desktop.

Select an option

Save edipofederle/761786 to your computer and use it in GitHub Desktop.
def simple(n)
raise ArgumentError, "Argumento Invalido" if n < 0
end
begin
simple(-4)
rescue Exception => e
puts "#{e.class}: #{e.message}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment