* proc.c (rb_method_entry_arity): fixed indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1612ad9d32
commit
afb957b129
26
proc.c
26
proc.c
@ -1479,24 +1479,24 @@ rb_method_entry_arity(const rb_method_entry_t *me)
|
|||||||
case VM_METHOD_TYPE_BMETHOD:
|
case VM_METHOD_TYPE_BMETHOD:
|
||||||
return rb_proc_arity(me->body.proc);
|
return rb_proc_arity(me->body.proc);
|
||||||
case VM_METHOD_TYPE_ISEQ: {
|
case VM_METHOD_TYPE_ISEQ: {
|
||||||
rb_iseq_t *iseq = me->body.iseq;
|
rb_iseq_t *iseq = me->body.iseq;
|
||||||
if (iseq->arg_rest == -1 && iseq->arg_opts == 0) {
|
if (iseq->arg_rest == -1 && iseq->arg_opts == 0) {
|
||||||
return iseq->argc;
|
return iseq->argc;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return -(iseq->argc + 1 + iseq->arg_post_len);
|
return -(iseq->argc + 1 + iseq->arg_post_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case VM_METHOD_TYPE_UNDEF:
|
case VM_METHOD_TYPE_UNDEF:
|
||||||
case VM_METHOD_TYPE_NOTIMPLEMENTED:
|
case VM_METHOD_TYPE_NOTIMPLEMENTED:
|
||||||
return 0;
|
return 0;
|
||||||
case VM_METHOD_TYPE_OPTIMIZED: {
|
case VM_METHOD_TYPE_OPTIMIZED: {
|
||||||
switch (me->body.optimize_type) {
|
switch (me->body.optimize_type) {
|
||||||
case OPTIMIZED_METHOD_TYPE_SEND:
|
case OPTIMIZED_METHOD_TYPE_SEND:
|
||||||
return -1;
|
return -1;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rb_bug("rb_method_entry_arity: invalid method entry type (%d)", me->type);
|
rb_bug("rb_method_entry_arity: invalid method entry type (%d)", me->type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user