Object* Proc::yield(STATE, CallFrame* call_frame, Arguments& args) { if(bound_method_->nil_p()) { // NOTE! To match MRI semantics, this explicitely ignores lambda_. return block_->call(state, call_frame, args, 0); } else { Dispatch dis; return call_prim(state, NULL, call_frame, dis, args); } }
Object* Proc::yield(STATE, CallFrame* call_frame, Arguments& args) { if(bound_method_->nil_p()) { // NOTE! To match MRI semantics, this explicitely ignores lambda_. return block_->call(state, call_frame, args, 0); } else if(NativeMethod* nm = try_as<NativeMethod>(bound_method_)) { return nm->execute(state, call_frame, nm, G(object), args); } else { return call_prim(state, call_frame, NULL, NULL, args); } }
Object* Proc::yield(STATE, CallFrame* call_frame, Arguments& args) { if(bound_method_->nil_p()) { // NOTE! To match MRI semantics, this explicitely ignores lambda_. return block_->call(state, call_frame, args, 0); } else if(NativeMethod* nm = try_as<NativeMethod>(bound_method_)) { Dispatch dis(state->symbol("call")); dis.method = nm; dis.module = G(rubinius); return nm->execute(state, call_frame, dis, args); } else { Dispatch dis; return call_prim(state, NULL, call_frame, dis, args); } }