ruby-changes:6783
From: mame <ko1@a...>
Date: Fri, 1 Aug 2008 01:02:33 +0900 (JST)
Subject: [ruby-changes:6783] Ruby:r18299 (trunk): * proc.c (rb_proc_call_with_block): reduce comparison.
mame 2008-08-01 01:02:18 +0900 (Fri, 01 Aug 2008) New Revision: 18299 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18299 Log: * proc.c (rb_proc_call_with_block): reduce comparison. Modified files: trunk/ChangeLog trunk/proc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18298) +++ ChangeLog (revision 18299) @@ -1,3 +1,7 @@ +Fri Aug 1 01:01:49 2008 Yusuke Endoh <mame@t...> + + * proc.c (rb_proc_call_with_block): reduce comparison. + Wed Jul 30 21:08:06 2008 Yusuke Endoh <mame@t...> * ext/syck/syck.c (syck_free_parser): fix memory leak by Index: proc.c =================================================================== --- proc.c (revision 18298) +++ proc.c (revision 18299) @@ -528,15 +528,18 @@ 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); } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/