برنامه نویسی
L2

روشهای رشته ای معادل دارند که به “!” که در واقع خود رشته را تغییر می دهد.
# Use normal methods to return new strings
my_string = "hello"
my_string.capitalize #=> "Hello"
puts my_string #=> "hello"
# And bang-methods (...!) to modify the object
my_string = "hello"
my_string.capitalize! #=> "Hello"
puts my_string #=> "Hello"