Ruby Tutor - Visualize Ruby code execution to learn Ruby online

(also visualize Python, Java, JavaScript, TypeScript, Ruby, C, and C++ code)

Write Ruby code here:

[coming soon!] Java options: pass in command-line arguments and feed user input to stdin

Create test cases

Ruby Examples

Containers | Globals | Constants | Blocks | Block scoping | More block scoping

Proc & Lambda | Proc scoping | Proc return | Lambda scoping | Inheritance | Symbols

Protected & private | Class & instance vars | Toplevel defs | Megagreeter