final Ruby runtime = context.getRuntime();
final ThreadContext localContext = context;
try {
if (block.isGiven()) {
callEach(runtime, context, self, new BlockCallback() {
public IRubyObject call(ThreadContext ctx, IRubyObject[] largs, Block blk) {
checkContext(localContext, ctx, "all?");
if (!block.yield(ctx, largs[0]).isTrue()) {
throw JumpException.SPECIAL_JUMP;
}
return runtime.getNil();
}
});
} else {
callEach(runtime, context, self, new BlockCallback() {
public IRubyObject call(ThreadContext ctx, IRubyObject[] largs, Block blk) {
checkContext(localContext, ctx, "all?");
if (!largs[0].isTrue()) {
throw JumpException.SPECIAL_JUMP;
}