Mega Code Archive

 
Categories / Ruby / String
 

Upcase does not change the original string

un_banged = 'Hello world.' un_banged.upcase    # => "HELLO WORLD." un_banged       # => "Hello world." banged = 'Hello world.' banged.upcase!      # => "HELLO WORLD." banged          # => "HELLO WORLD."