This is a multi-part message in MIME format.

------extPart_000_0007_01C0F50A.994B4960
Content-Type: text/plain;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

Matz wrote:
> |Is it possible to pass over multiple arguments to the 
> |block using rb_yield or is there some similarly simple
> |method for this?
>
> invoke rb_yield() with array argument, for example,
>
> rb_yield(rb_ary_new3(3, INT2FIX(1), INT2FIX(2), INT2FIX(3)));

Ok, but what if I would like to pass one variable which happens to be an array?

Does the compiler first look whether the block expects one or more variables, and
assumes that rb_yield is called with an array parameter in the latter case?



------extPart_000_0007_01C0F50A.994B4960
Content-Type: text/html;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff><FONT face=Arial>
<DIV><FONT size=2>Matz wrote:</FONT><BR>&gt; |<FONT color=#007700>Is it possible 
to pass over multiple arguments to the </FONT><BR>&gt; |<FONT 
color=#007700>block using rb_yield or is there some similarly 
simple</FONT><BR>&gt; |<FONT color=#007700>method for this?</FONT><BR><FONT 
size=2>&gt;</FONT><BR>&gt; invoke rb_yield() with array argument, for 
example,<BR><FONT size=2>&gt;</FONT><BR>&gt; rb_yield(rb_ary_new3(3, INT2FIX(1), 
INT2FIX(2), INT2FIX(3)));<BR></DIV>
<DIV><FONT size=2>Ok, but what if I would like to pass one variable which 
happens to be an array?</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Does the compiler first look whether the block expects one or 
more variables, and</FONT></DIV>
<DIV><FONT size=2>assumes that rb_yield is called with&nbsp;an array 
parameter&nbsp;in the latter case?</FONT></DIV>
<DIV><FONT size=2></FONT><BR>&nbsp;</DIV></FONT></BODY></HTML>

------extPart_000_0007_01C0F50A.994B4960--