string.downcase returns the downcased version of the string - it does
not affect the source object. If you want that reference to become
downcase you need
str = “ADD”
str = str.downcase
str.downcase will do what it’s supposed to, but str will still be
whatever it was originally. If you’re new to OO programming this one
can really confuse you.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.