type compare in ruby