From: Tom Sawyer Date: 2002-07-20T04:32:48+09:00 Subject: Re: Character Code line[0,1] although i sometimes get errors with that, so line[0..0] seems to work best line[0] just returns the bytecode. go figure. ~transami On Fri, 2002-07-19 at 13:21, the Bare wrote: > Hi: > > My apologies if this is a ridiculously simple question... > > Giiven the following code: > > line = file.readline.strip > # line = '; some line' > > if line[0].to_s == ';' # false! line[0] = 59, not ';' > # ... > end > > My problem is, line[0] returns a fixnum, which doesn't compare with the > ';' string. So... how do perform this comparison? > > Thanks, > Cameron > > -- > "Perhaps a lunatic was simply a minority of one" > George Orwell > > > > -- ~transami _(")_ dobee dobee do... \v/ ^ ^