From: Rob Biedenharn Date: 2010-10-19T05:51:40+09:00 Subject: Re: Help with array On Oct 18, 2010, at 4:29 PM, Matthew Boston wrote: > I'm working through the rubykoans and I cannot figure out one of them. > > array = [1, 2, 3, 4] > > Why does array[4,0] return [] but array[5,0] return nil? > > From RDoc: > Returns nil if the index (or starting index) are out of range. > > That means array[4,0] would return nil, right? > > Thanks for the help. > > -- > Posted via http://www.ruby-forum.com/. > Rather than repeat it, just refer to this thread: http://www.ruby-forum.com/topic/216796 -Rob Rob Biedenharn Rob@AgileConsultingLLC.com http://AgileConsultingLLC.com/ rab@GaslightSoftware.com http://GaslightSoftware.com/