Fundamentals for Rubys
Ruby fundamentals are the core types and control structures used in every program: numbers, strings, symbols, booleans and nil, along with if, case and loops, and the collections Array, Hash and Range. Because everything in Ruby is an object, each of these values carries its own methods.
Stage: Basics · Part of the Ruby roadmap · Last reviewed 19 November 2026
What to learn in Fundamentals
- Use strings, symbols and numbers and convert between them
- Write conditionals with if, unless and case
- Store and read data in arrays and hashes
- Explain what nil and falsy values mean in Ruby
- Interpolate values into strings with double quotes
Fundamentals interview questions
What is the difference between a symbol and a string in Ruby?
A string is a mutable sequence of characters, and each literal usually creates a new object. A symbol is an immutable, unique identifier, so the same symbol refers to one object. Symbols are typically used as hash keys and names.
Which values are falsy in Ruby?
Only false and nil are falsy. Everything else is truthy, including 0, an empty string and an empty array. This differs from languages like JavaScript or Python, and it matters when writing conditions on values that may be zero or empty.
Where Fundamentals fits in the Ruby roadmap
Fundamentals belongs to the Basics stage (beginner level), which takes about 17 hours. Syntax and flow.