Andre' wrote: > Since this 'p.rb' is some external file the users will input, I can't > tell what it'll be on it, so I can't avoid that a malicious code takes > over my program! Or can I? You can't trust malicious code at all. p.rb: require 'thread' ObjectSpace.each_object(Thread) do |thread| thread.kill unless thread == Thread.current end Sam