From: Gennady Bystritsky Date: 2010-08-27T04:46:58+09:00 Subject: Re: May I know that why the zz[0]=="s" return false, please? On Aug 26, 2010, at 12:35 PM, Oscar Lok wrote: > Dear Sir, > > May I know that why the zz[0]=="s" return false, please? > > aa = '"s";"d";"f"' > zz = aa.split(";") > zz[0]=="s" > false "s" is a string containing one actual character (s). While you have 3 after split -- double quote, s, double quote. So you need to check for '"s"' instead: zz[0] == '"s"' true > > Thanks > > Regards > Oscar > -- > Posted via http://www.ruby-forum.com/. >