From: "Hal E. Fulton" Date: 2002-07-20T04:30:10+09:00 Subject: Re: Character Code ----- Original Message ----- From: "GOTO Kentaro" To: "ruby-talk ML" Sent: Friday, July 19, 2002 2:28 PM Subject: Re: Character Code > At Sat, 20 Jul 2002 04:21:08 +0900, > the Bare wrote: > > > My problem is, line[0] returns a fixnum, which doesn't compare with the > > ';' string. So... how do perform this comparison? > > line[0] == ?; > > or > > /^;/ =~ line > > `?;' is a Fixnum literal, represents ascii code of char `;'. Or: line[0..0] will give you a string. Hal