зеркало из https://github.com/github/ruby.git
* 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:
Родитель
1612ad9d32
Коммит
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:
|
||||
return rb_proc_arity(me->body.proc);
|
||||
case VM_METHOD_TYPE_ISEQ: {
|
||||
rb_iseq_t *iseq = me->body.iseq;
|
||||
if (iseq->arg_rest == -1 && iseq->arg_opts == 0) {
|
||||
return iseq->argc;
|
||||
}
|
||||
else {
|
||||
return -(iseq->argc + 1 + iseq->arg_post_len);
|
||||
}
|
||||
rb_iseq_t *iseq = me->body.iseq;
|
||||
if (iseq->arg_rest == -1 && iseq->arg_opts == 0) {
|
||||
return iseq->argc;
|
||||
}
|
||||
else {
|
||||
return -(iseq->argc + 1 + iseq->arg_post_len);
|
||||
}
|
||||
}
|
||||
case VM_METHOD_TYPE_UNDEF:
|
||||
case VM_METHOD_TYPE_NOTIMPLEMENTED:
|
||||
return 0;
|
||||
case VM_METHOD_TYPE_OPTIMIZED: {
|
||||
switch (me->body.optimize_type) {
|
||||
case OPTIMIZED_METHOD_TYPE_SEND:
|
||||
return -1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (me->body.optimize_type) {
|
||||
case OPTIMIZED_METHOD_TYPE_SEND:
|
||||
return -1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
rb_bug("rb_method_entry_arity: invalid method entry type (%d)", me->type);
|
||||
|
|
Загрузка…
Ссылка в новой задаче