Guest User

Untitled

a guest
Apr 25th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. def f(should_fail=false)
  2. puts "BODY 1"
  3. fail if should_fail
  4. puts "BODY 2"
  5. rescue StandardError => ex
  6. puts "RESCUE"
  7. else
  8. puts "ELSE"
  9. ensure
  10. puts "ENSURE"
  11. end
  12.  
  13. f(!ARGV.empty?)
Add Comment
Please, Sign In to add comment