Why Array.uniq! returns nil if it doesn't do anything (every element is unique). Same for Array.compact! Next example requires two times the memory what uniq! -version would. Could be a problem with large texts. uniqChars = text.split(//).uniq I know it could be coded better using hashes but this is just an example. - Aleksi