Skip to content

Instantly share code, notes, and snippets.

@zlx
Created March 24, 2014 14:54
Show Gist options
  • Save zlx/9741693 to your computer and use it in GitHub Desktop.
Save zlx/9741693 to your computer and use it in GitHub Desktop.
t1 = Thread.new do
raise RuntimeError, "oops!" rescue $!
end
t2 = Thread.new do
raise ArgumentError, "doh!" rescue $!
end
puts "main: #{$!.inspect}"
puts "t1: #{t1.value.inspect}"
puts "t2: #{t2.value.inspec}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment