Created
July 16, 2012 03:22
-
-
Save dekz/3120249 to your computer and use it in GitHub Desktop.
JRuby __jtrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| done | |
| #<NoMethodError: undefined method `__jtrap' for #<Zab:0x153b2cb>> | |
| #<NoMethodError: undefined method `__jtrap' for #<Zab:0x3c63e8c>> | |
| #<NoMethodError: undefined method `__jtrap' for #<Zab:0x2e694f12>> | |
| #<NoMethodError: undefined method `__jtrap' for #<Zab:0x26dfe303>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Zab | |
| def start | |
| trap(:INT) do | |
| puts 'a' | |
| end | |
| end | |
| end | |
| def test | |
| Thread.new do | |
| z = Zab.new | |
| begin | |
| z.start | |
| rescue Exception => e | |
| p e | |
| end | |
| end | |
| end | |
| 5.times { test } | |
| puts 'done' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment