hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

Undead.rb #

by why in inspect

While browsing the bigbold collection of Ruby snips, a very interesting battle pitting Ruby’s internal means of self-termination against the collar-snatching wait-hey-you-get-back-here of ensure.

 begin
   Thread.current.kill
   exit(1)
   #`kill -9 #{$$}` # this will successfully kill you
   puts "after kill" 
 ensure
   puts "HA HA!" 
 end 

Courtesy of Mathieu Jobin (~somekool.)

said on 25 Apr 2005 at 13:09

Nicely evil.

Comments are closed for this entry.