public static IRubyObject raise(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
// FIXME: Pass block down?
Ruby runtime = context.getRuntime();
if (args.length == 0) {
IRubyObject lastException = runtime.getGlobalVariables().get("$!");
if (lastException.isNil()) {
throw new RaiseException(runtime, runtime.getRuntimeError(), "", false);
}
throw new RaiseException((RubyException) lastException);
}
IRubyObject exception;
if (args.length == 1) {
if (args[0] instanceof RubyString) {
throw new RaiseException((RubyException)runtime.getRuntimeError().newInstance(context, args, block));
}