Undead.rb #
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.)
binkley
Nicely evil.
Comments are closed for this entry.