lib/active_support/inflector/methods.rb in activesupport-7.1.1 vs lib/active_support/inflector/methods.rb in activesupport-7.1.2

- old
+ new

@@ -162,19 +162,19 @@ # # upcase_first('what a Lovely Day') # => "What a Lovely Day" # upcase_first('w') # => "W" # upcase_first('') # => "" def upcase_first(string) - string.length > 0 ? string[0].upcase.concat(string[1..-1]) : "" + string.length > 0 ? string[0].upcase.concat(string[1..-1]) : +"" end # Converts the first character in the string to lowercase. # # downcase_first('If they enjoyed The Matrix') # => "if they enjoyed The Matrix" # downcase_first('I') # => "i" # downcase_first('') # => "" def downcase_first(string) - string.length > 0 ? string[0].downcase.concat(string[1..-1]) : "" + string.length > 0 ? string[0].downcase.concat(string[1..-1]) : +"" end # Capitalizes all the words and replaces some characters in the string to # create a nicer looking title. +titleize+ is meant for creating pretty # output. It is not used in the \Rails internals.