From: Abder-rahman Ali Date: 2010-06-19T02:50:32+09:00 Subject: Re: String comparison. Why does Ruby consider this true? Abder-rahman Ali wrote: > When I try for example to compare the following strings in Ruby, I get > "true". > > puts 'Xeo' < 'ball' > > When I make 'Xeo' start with a lowercase letter, i get 'false' > > puts 'xeo' < 'ball' > > The second statement is clear, but why when I capitalize 'Xeo' I get > true? > > Thanks. The "Learn to Program" book by Chris Pine mentions that computers order capital letters as coming before lowercase letters. So, can it be explained then by this? Thanks. -- Posted via http://www.ruby-forum.com/.