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! → str or nil Downcases the contents of str, returning nil if no changes were made. Note: case replacement is effective only in ASCII region.
downcase! → str or nil
Downcases the contents of str, returning nil if no changes were made. Note: case replacement is effective only in ASCII region.
Documentation: String#downcase!