From: "ibc (Iñaki Baz Castillo)" Date: 2012-06-13T21:29:20+09:00 Subject: [ruby-core:45624] [ruby-trunk - Bug #6575] Thread#kill sets rb_errinfo() to Fixnum 8 after rb_protect(function, data, &error_tag) Issue #6575 has been updated by ibc (I��aki Baz Castillo). Hi, I've installed rvm and ruby-head, which is retrieved from https://github.com/ruby/ruby/. Unfortunately the patch you mean, which is this: https://github.com/ruby/ruby/commit/38d3b013b7733d9ccd66c011d74c00b35bb704c4 was reverted: https://github.com/ruby/ruby/commit/cc08e95b206f8c98af9509f99339f3c8655481e7 so... ---------------------------------------- Bug #6575: Thread#kill sets rb_errinfo() to Fixnum 8 after rb_protect(function, data, &error_tag) https://bugs.ruby-lang.org/issues/6575#change-27218 Author: ibc (I��aki Baz Castillo) Status: Open Priority: Normal Assignee: Category: core Target version: 1.9.3 ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] Using rb_protect() I've realized that when the thread is killed by other thread using Thread#kill, the error_tag passed to rb_protect() is set to 8 and rb_errinfo() returns Fixnum 8: ret = rb_protect(function, data, &error_tag); // While executing function() in Ruby land, our thread is // killed by Thread.kill. // If now I inspect rb_errinfo() it returns Fixnum 8, and // error_tag it's set to integer 8. Is it the expected behaviour? Wouldn't make more sense rb_errinfo() to return some kind of a new exception ThreadKilledException or whatever instead of Fixnum 8? -- http://bugs.ruby-lang.org/