@JRubyMethod(meta = true) public static IRubyObject exit(IRubyObject receiver, Block block) { RubyThread rubyThread = receiver.getRuntime().getThreadService().getCurrentContext().getThread(); synchronized (rubyThread) { rubyThread.status.set(Status.ABORTING); rubyThread.mail = null; receiver.getRuntime().getThreadService().setCritical(false); throw new ThreadKill(); } }