IRB (Interactive Ruby)
In this page:
IRB (Interactive Ruby)
IRB is Ruby's interactive console, started by typing irb in a terminal, where you can type expressions and see results immediately. It's the fastest way to experiment with small snippets of Ruby without creating a file. Every expression's result is automatically printed, similar to a calculator.
Note: Type exit or press Ctrl+D to leave an IRB session.
Example: IRB (Interactive Ruby)
# Simulating what you'd see interacting with irb:
puts "2 + 2 = #{2 + 2}"
puts "In irb, typing '2 + 2' alone would print '=> 4' automatically"
Login to try C/C++/Java/PHP code in the editor
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: