The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Undead.rb

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Undead.rb Posted: Apr 25, 2005 9:53 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Undead.rb
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

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.)

Read: Undead.rb

Topic: The Infamous Hacker Who Took Down Localhost Previous Topic   Next Topic Topic: The Perils of Duck Typing?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use