IRB

IRB is a REPL for Ruby which you can play with Ruby code.

Ruby 3.1 introduced autocomplete feature:

But if the color and cursor movements are too much for you, disable with

# ~/.irbrc
IRB.conf[:USE_AUTOCOMPLETE] = false

You can also use binding.irb in your app to interactively debug things (See Binding.

IRB 1.3.5 can paste multi-line with leading dots (ruby/irb #202).