ruby_strings
🔤 Working with Strings​
Ruby strings are used to represent text in your programs. You can define them with single or double quotes—double-quoted strings support interpolation and escape sequences, making them more flexible.
# Single-quoted string (no interpolation)
name = 'Alice'
# Double-quoted string with interpolation and newline
welcome = "Hello, #{name}!\nWelcome to Ruby."
puts welcome