<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BLOCKQUOTE type="cite"><DIV style=""><DIV style="">No it's not in the framework already. Thanks for the patch. Am I correct in thinking this patch only deals with simulating a method that yields multiple times with a single parameter each time, like this... <BR style=""><BR style=""><SPAN style=""><FONT class="Apple-style-span" face="courier new">def my_method</FONT></SPAN><FONT class="Apple-style-span" face="courier new"><BR style=""></FONT><SPAN style=""><FONT class="Apple-style-span" face="courier new">  yield(1)</FONT></SPAN><FONT class="Apple-style-span" face="courier new"><BR style=""></FONT><SPAN style=""><FONT class="Apple-style-span" face="courier new">  yield(2)</FONT></SPAN><FONT class="Apple-style-span" face="courier new"><BR style=""></FONT><SPAN style=""><FONT class="Apple-style-span" face="courier new">end</FONT></SPAN><BR style=""></DIV><BR style=""></DIV></BLOCKQUOTE>  Yes, what I submitted only works for the above type scenario<DIV><BR><BLOCKQUOTE type="cite"><DIV style="">I'm wondering if we should also deal with the more generic case where different numbers of parameters could be yielded each time, like this... <BR style=""><BR style=""><SPAN style=""><FONT class="Apple-style-span" face="courier new">def my_method</FONT></SPAN><FONT class="Apple-style-span" face="courier new"><BR style=""></FONT><SPAN style=""><FONT class="Apple-style-span" face="courier new">  yield(1)</FONT></SPAN><FONT class="Apple-style-span" face="courier new"><BR style=""></FONT><SPAN style=""><FONT class="Apple-style-span" face="courier new">  yield(2,3)</FONT></SPAN><FONT class="Apple-style-span" face="courier new"><BR style=""></FONT><SPAN style=""><FONT class="Apple-style-span" face="courier new">end</FONT></SPAN><FONT class="Apple-style-span" face="courier new"><BR style=""></FONT><BR style=""></DIV></BLOCKQUOTE> You could handle this by passing in an array as an element of the array.  Then, in the yield you could yield and splat the value being yielded.<BR><BLOCKQUOTE type="cite"><DIV style=""></DIV>I like the way <SPAN style=""><FONT class="Apple-style-span" face="courier new">yields()</FONT></SPAN> currently mirrors the behaviour of <SPAN style=""><FONT class="Apple-style-span" face="courier new">returns()</FONT></SPAN>, but it's becoming clear that <SPAN style=""><FONT class="Apple-style-span" face="courier new">yields()</FONT></SPAN> has to deal with more multiplicity - you can only return once from a method with a single value; whereas you can yield multiple values multiple times from a single method. It would be good to deal with all this multiplicity at once with a single simple syntax. </BLOCKQUOTE> Of course, I only made the change that fits what I need. :)<BR><DIV></DIV><BR></DIV></BODY></HTML>