From: Dave Thomas Date: 2000-12-21T23:49:51+09:00 Subject: [ruby-talk:7871] Re: Comparsion Problem? "Jiangyi Liu" writes: "Hello".each_byte { |c| puts c if c == "o" print "oh, i got an o!", "\n" end } => 72 101 108 108 111 #each_byte returns an integer character code, rather than a string, so the comparison fails. You could try comparing against ?o, which is the chapter 'o' expressed as an integer: "Hello".each_byte { |c| puts c if c == ?o print "oh, i got an o!", "\n" end } Regards Dave