I just started Ruby programming. I had read Difference Between downcase and downcase! in Ruby. However I encounter an interesting problem in practice, here is code:
downcase! will return nil if no changes were made. You can check it with ri downcase!
ri downcase!