Guest User

Untitled

a guest
Oct 17th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. def hi
  2. sleep 2
  3. hello
  4. end
  5.  
  6. def hello
  7. raise "hi"
  8. end
  9.  
  10. th = Thread.new do
  11. hi
  12. end
  13.  
  14. th.join
  15.  
  16. # ruby 1.9.3
  17. # /tmp/a.rb:7:in `hello': hi (RuntimeError)
  18. # from /tmp/a.rb:3:in `hi'
  19. # from /tmp/a.rb:11:in `block in <main>'
  20. # ruby 1.8.7
  21. # /tmp/a.rb:7:in `hello': hi (RuntimeError)
  22. # from /tmp/a.rb:14:in `join'
  23. # from /tmp/a.rb:14
Add Comment
Please, Sign In to add comment