On Fri, Sep 05, 2008 at 01:44:23AM +0900, Daniel Luz wrote:
> I should note that $?, along with $_ and many regexp-related
> variables, is actually thread-local, despite its apparently-global
> name.

$_ is thread-local, but $? really is global:

  rb_define_readonly_variable("$?", &rb_last_status);

I'm sure there's a good reason, but I don't know what it is. (maybe
something to do with calling Process.wait from a signal handler?)

Paul