Available now · Foundations
Values
Predict calculations and explore numbers, strings, symbols, booleans, and nil. Six editable examples introduce Ruby without programming prerequisites.
Ruby, in your browser
Learn Ruby by working with code.
Start with values →Available now · Foundations
Predict calculations and explore numbers, strings, symbols, booleans, and nil. Six editable examples introduce Ruby without programming prerequisites.
Available now · Foundations
Name values, calculate with variables, and predict what changes after reassignment. Six editable examples build on Values.
Available now · Foundations
Put values into text, join strings, and explore length and letter case. Six editable examples build on Values and Variables.
Available now · Foundations
Compare values, choose a branch, and assign the result of an if expression. Six editable examples build on Variables.
Available now · Foundations
Define and call methods, pass arguments, and reuse returned values. Six editable examples build on Variables.
Available now · Collections
Read values by index, replace an element, and append to an array. Six editable examples build on Variables.
Available now · Collections
Read values by key, check for entries, and change a hash. Six editable examples build on Variables.
Available now · Collections and repetition
Repeat code with while, visit array elements, and build a running total. Six editable examples build on Conditions and Arrays.
Available now · Behavior and captured state
Trace local names in a method and its caller. Six editable examples build on Variables and Methods.
Available now
Pass behavior to a method, collect results with map, and explore what a closure remembers. Six editable examples run Ruby in your browser.
Running examples needs JavaScript and a network connection. You can read the code and answers without them.
Available now · Collections and blocks
Choose array values with select and reject, then transform them with map. Six editable examples build on Blocks and Arrays.
Available now · Objects
Create counters with their own stored values. Six editable examples build on Methods and show how calls update each object.
Available now · Objects
Include reusable methods in classes and call them on objects. Six editable examples build on Classes and update each counter's stored number.
Available now · Errors
Raise an error, rescue its specific class, and follow the normal and error paths. Six editable examples build on Methods and Conditions.
Available now · Language details
Supply values by name, use defaults, and pass an options hash with **. Six editable examples build on Methods and Hashes.
Available now · Language details
Match a hash, capture a value, and choose a branch with a guard. Six editable examples build on Hashes and Conditions.
New to Ruby? Start with the values lesson and explore at your own pace. Use the skill tree to find the foundations for later topics.
Already use Ruby? Revisit how familiar code works. Future lessons are planned to cover language developments with examples tied to specific Ruby versions.
This approach is influenced by Justin Skycak's Advice on Upskilling, especially its emphasis on active practice and foundations.