mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
1 changed files with 13 additions and 13 deletions
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);
|
||||
|
|
Loading…
Reference in a new issue