On Sat, Sep 15, 2012 at 9:33 AM, Hassan Schroeder
<hassan.schroe...@gmail.com> wrote:
> On Sat, Sep 15, 2012 at 3:21 AM, Maddy <ashokku...@shriramits.com> wrote:
>
>> In an array value i need to find except first two values,
>>
>> example:
>> [1,2,3,4,5,6,7,8 ]
>>
>> in that i need to get values except [1,2].
>>
>> How can i get it from this array??
>>
>> please advise....
>
> Advisory #1: READ THE DOCS FOR ARRAY.
>
> Advisory #2:  [1,2,3,4,5,6,7,8].drop 2

Could you not just do [1, 2, 3, 4, 5, 6, 7, 8][2..-1]

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to