зеркало из https://github.com/github/ruby.git
* proc.c (rb_proc_call_with_block): reduce comparison.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e40f25ae36
Коммит
f3730b8260
|
@ -1,3 +1,7 @@
|
|||
Fri Aug 1 01:01:49 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* proc.c (rb_proc_call_with_block): reduce comparison.
|
||||
|
||||
Wed Jul 30 21:08:06 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* ext/syck/syck.c (syck_free_parser): fix memory leak by
|
||||
|
|
7
proc.c
7
proc.c
|
@ -528,15 +528,18 @@ rb_proc_call(VALUE self, VALUE args)
|
|||
VALUE
|
||||
rb_proc_call_with_block(VALUE self, int argc, VALUE *argv, VALUE pass_procval)
|
||||
{
|
||||
rb_proc_t *proc, *pass_proc = 0;
|
||||
rb_proc_t *proc;
|
||||
rb_block_t *block = 0;
|
||||
GetProcPtr(self, proc);
|
||||
|
||||
if (!NIL_P(pass_procval)) {
|
||||
rb_proc_t *pass_proc;
|
||||
GetProcPtr(pass_procval, pass_proc);
|
||||
block = &pass_proc->block;
|
||||
}
|
||||
|
||||
return vm_invoke_proc(GET_THREAD(), proc, proc->block.self,
|
||||
argc, argv, (pass_proc ? &pass_proc->block : 0));
|
||||
argc, argv, block);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче