From: sharmin malik Date: 2012-09-09T20:52:59+09:00 Subject: Match an ARray Element by if Hi bellow example : a =Array.new a = ['Cat','Dog'] if a.include? 'Dog1' puts "yes" else puts "no" end its works perfectly But when i am trying to this sssh = Net::SSH.start(@hostname2, @username, :password => @password) res2 = ssh.exec!(@cmd) ssh.close puts "2nd host" sname = Array.new sname << res2 if (sname.include?'test1') puts "its has value" else puts "its does not have value" end puts sname but this does not work output : its does not have value test1 test2 Can any one please tell me what i am doing wrong ? Thanks -- Posted via http://www.ruby-forum.com/.