As far as I can tell, this is the correct way to do case-insensitive string comparison in Ruby:
RUBY:
-
if string1.casecmp(string2) == 0
-
# strings match, ignoring case
-
end
That's so ugly, it almost looks like Java. Actually, it's worse than Java, which has String#equalsIgnoreCase.












