Skip to content

Instantly share code, notes, and snippets.

@ryangreenberg
Created September 6, 2011 23:35
Show Gist options
  • Save ryangreenberg/1199301 to your computer and use it in GitHub Desktop.
Save ryangreenberg/1199301 to your computer and use it in GitHub Desktop.
self.destruct!
#!/usr/bin/env ruby -wKU
class Object
def destruct!
print "This message will self-destruct in..."
5.downto(0) {|i| print "#{i}..."; $stdout.flush; sleep(1)}
File.open(__FILE__, 'w') { }
end
end
self.destruct!
@kevinweil
Copy link

Win. Although to be fair, you could do this in any language :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment