mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* proc.c (proc_to_s): used a variable before initialized.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
68e02f2c2c
commit
d1bd418715
2 changed files with 14 additions and 10 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun Jun 24 16:35:46 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* proc.c (proc_to_s): used a variable before initialized.
|
||||
|
||||
Sun Jun 24 16:05:45 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm.c (callee_setup_arg): added. support correct post arg.
|
||||
|
|
8
proc.c
8
proc.c
|
@ -542,10 +542,11 @@ proc_to_s(VALUE self)
|
|||
rb_proc_t *proc;
|
||||
char *cname = rb_obj_classname(self);
|
||||
rb_iseq_t *iseq;
|
||||
const char *is_lambda = proc->is_lambda ? " (lambda)" : "";
|
||||
const char *is_lambda;
|
||||
|
||||
GetProcPtr(self, proc);
|
||||
iseq = proc->block.iseq;
|
||||
is_lambda = proc->is_lambda ? " (lambda)" : "";
|
||||
|
||||
if (RUBY_VM_NORMAL_ISEQ_P(iseq)) {
|
||||
int line_no = 0;
|
||||
|
@ -1164,8 +1165,6 @@ umethod_bind(VALUE method, VALUE recv)
|
|||
int
|
||||
rb_node_arity(NODE* body)
|
||||
{
|
||||
int n;
|
||||
|
||||
switch (nd_type(body)) {
|
||||
case NODE_CFUNC:
|
||||
if (body->nd_argc < 0)
|
||||
|
@ -1179,7 +1178,8 @@ rb_node_arity(NODE* body)
|
|||
return 0;
|
||||
case NODE_BMETHOD:
|
||||
return rb_proc_arity(body->nd_cval);
|
||||
case RUBY_VM_METHOD_NODE:{
|
||||
case RUBY_VM_METHOD_NODE:
|
||||
{
|
||||
rb_iseq_t *iseq;
|
||||
GetISeqPtr((VALUE)body->nd_body, iseq);
|
||||
if (iseq->arg_rest == -1 && iseq->arg_opts == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue