Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!talisker.lacave.net!lacave.net!not-for-mail From: 7stud -- Newsgroups: comp.lang.ruby Subject: Re: Array indexing Date: Sat, 23 Apr 2011 12:02:56 -0500 Organization: Service de news de lacave.net Lines: 35 Message-ID: References: NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1303578191 77553 65.111.164.187 (23 Apr 2011 17:03:11 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Sat, 23 Apr 2011 17:03:11 +0000 (UTC) In-Reply-To: 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: 382091 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3404 Duke Normandin wrote in post #994657: > hey ... > > I want to make sure that I understand the subtle difference in the > syntax. > > my_array[0,3] > > and > > my_array[0..2] > > both will return the same array elements - correct? > If someone had a gun to your head and told you that you had 30 seconds to provide an answer to that question, what would you do? > the first _says_: "start at index0 & gimme 3" > the latter _say_: "start at index0 and goto index2" > Where is the ruby documentation located? > If the data requirements start at >index0, then there is no offset > between the "gimme" and the 'goto". > > Am I getting it? No. -- Posted via http://www.ruby-forum.com/.