Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rubites

Learn Ruby fundamentals by fixing broken code. Inspired by Ziglings.

Requirements

  • Ruby 3.4+ — exercise 016 prints a hash, and 3.4 changed how hashes display

Getting Started

  1. Clone this repo
  2. Run bin/rubites
  3. Fix the first broken exercise
  4. Run bin/rubites again
  5. Repeat until all 35 exercises pass!

How It Works

Each exercise in exercises/ has broken or incomplete Ruby code. The comments explain the concept and tell you what the expected output should be. Fix the code, run the runner, and move on.

If you get stuck, check the solutions/ directory for reference answers.

Topics Covered

Exercises Topic
001-003 Variables & Types
004-006 Strings
007-009 Numbers & Booleans
010-012 Control Flow
013-015 Arrays
016-018 Hashes & Ranges
019-021 Iteration
022-024 Methods
025-027 Blocks, Procs, Lambdas
028-030 Classes & Objects
031-032 Modules & Mixins
033-034 Error Handling
035 Pattern Matching

Senior Challenges

Completed the fundamentals? Try the senior track:

bin/rubites --senior

These exercises cover advanced Ruby concurrency — Fibers and Ractors. No solutions provided (yet).

Exercises Topic
001-003 Fibers
004-006 Ractors

Progress

The runner tracks your progress automatically - it runs through exercises in order and stops at the first one that fails.

Tests

ruby test/solutions_test.rb

Runs every solution and checks it prints what its exercise promises, so a broken exercise or a wrong "Expected output" line can't go unnoticed. It also checks the exercises are still shipped unsolved.

Contributing

Pull requests welcome! If you'd like to add exercises, follow the format in the existing files.

Licence

MIT

About

Learn Ruby fundamentals by fixing broken code. 35 exercises.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages