th = Thread.new{
 print "Going to sleep for 5 seconds\n"
 sleep(5)
 print "Going to sleep for infinity\n"
 sleep(0)
 print "awake, did someone wake me up?\n"
}

key = STDIN.getc
th.run
-----------------------------------------------
will give:
Going to sleep for 5 seconds
Going to sleep for infinity
awake, did someone wake me up?
<pressing key>
test.rb:9:in `run': killed thread (ThreadError)
        from test.rb:9
(with both 1.8.0-preview and 1.6.8)
-----------------------------------------------

from the pickaxe book "...An argument of zero causes sleep to sleep forever. "

Have I seriously misunderstood this or something more evil is at work here? :-)
As far as I can see the thread should not give "awake, did someone wake me up"
until after I've pressed a key, but sleep 0 seems to really sleep for 0 seconds
instead of until SIGALRM/run.