Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail From: 7stud -- Newsgroups: comp.lang.ruby Subject: Re: Generating Functions in Ruby Date: Mon, 23 May 2011 16:25:34 -0500 Organization: Service de news de lacave.net Lines: 14 Message-ID: References: <5e21af14-befb-406e-b1c3-6758fe1527ab@s14g2000vbi.googlegroups.com> <93jrqvFrf0U2@mid.individual.net> <41214f15ab9bccbeb6ceab7f7fb220b0@ruby-forum.com> <5d31b677-f378-4a9a-9046-65dd3dbbfab1@dn9g2000vbb.googlegroups.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1306185973 77697 65.111.164.187 (23 May 2011 21:26:13 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Mon, 23 May 2011 21:26:13 +0000 (UTC) In-Reply-To: <5d31b677-f378-4a9a-9046-65dd3dbbfab1@dn9g2000vbb.googlegroups.com> X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 383654 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:4949 Andreas Lundgren wrote in post #1000369: > 5) Most ruby programmers don't use for-in because that construct just calls each(), so ruby programmers call each() directly: 2..no_of_params.each do |i| arg_list = arg_list + ', x' + i.to_s; params = params + ' + \', \' + x' + i.to_s + '.to_s'; end -- Posted via http://www.ruby-forum.com/.