DEV Community

Nitin Reddy
Nitin Reddy

Posted on

1 2

Ruby: IRB tab-autocomplete

Ruby's IRB is a pretty good environment to quickly test a snippet of code. And when you want to test a snippet of code, you do not necessarily know all of the methods and properties for the objects you are working with. If only there were a tab code-complete feature in IRB.

...which has been available in IRB since too-long-ago-to-remember.

What you neeed to do is run this one-line require and then you get autocomplete:

require 'irb/completion'
Enter fullscreen mode Exit fullscreen mode

For instance, type

'red'.cap
Enter fullscreen mode Exit fullscreen mode

and then press Tab. Auto-complete! :-)

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up