From: Stefano Crocco Date: 2008-02-10T07:07:38+09:00 Subject: Re: Identifying Alle Saturday 09 February 2008, Adam Akhtar ha scritto: > If you have an array which contains a mixture of say intergers and > nested arrays, how can you determine whether an element is an array or > not > > ie in psedo code > > array.each do |x| > if x == Array > do something > end > > whats the corect way to write the if statement? > > Thanks > > Adam. if x.is_a? Array Stefano