From: Dan Schmidt Date: 2000-12-22T02:10:02+09:00 Subject: [ruby-talk:7888] Re: Comparsion Problem? "Jiangyi Liu" writes: | I met a problem when I tried to write some Ruby code to learn | Ruby. The following code just can't work as expected, | | "Hello".each_byte { |c| | if c == "o" | print "oh, i got an o!", "\n" | end | } In ruby, characters and one-element strings are different types, unlike some other languages. Try 'if c == ?o' insead. -- http://www.dfan.org