From: PullMonkey Date: 2008-02-10T07:07:14+09:00 Subject: Re: Identifying ------=_Part_3103_21959838.1202594840599 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline if x.class == Array or if x.is_a?(Array) irb(main):008:0> [1,2,3,[34,56,43,7],6,7].map{|x| x.is_a?(Array)} => [false, false, false, true, false, false] On Feb 9, 2008 3:01 PM, Adam Akhtar wrote: > > > 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. > > in the above array = [1,2,3,[34,56,43,7],6,7] etc > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_3103_21959838.1202594840599--