Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby Collections Ruby Arrays Ruby Arrays

MICHAEL P
MICHAEL P
5,191 Points

What is the keyboard shortcut that Jason uses to quickly "recall" the array in irb?

In irb, when Jason types the array:

grocery_list = ["milk" , "eggs" , "bread"] and types enter so that the array is stored,

how does he so quickly get the: grocery_list = ["milk" , "eggs" , "bread"] to come up so quickly so that he does not have to reenter grocery_list = ["milk" , "eggs" , "bread" so that he can quickly add the 1 , 2, 3 to the array ? What command do I type on the keyboard? I am using a mac computer. Thank you

4 Answers

Kristi Smythe
Kristi Smythe
10,665 Points

I would also like to know the answer to your question Michael. The up arrow works at the command line but ! in irb.

RubyMine appears to be an excellent tool for working with Ruby irb local on Mac, so if we don't get a working response for this Q it might be a good idea to get comfy with RubyMine local, ie. not doing these tuts in Workspaces. https://www.jetbrains.com/ruby/help/running-irb-console.html

MICHAEL P
MICHAEL P
5,191 Points

I used the Up arrow key also, and it did not work. I correctly typed the array into irb.

Matthew Day
Matthew Day
6,740 Points

The Up arrow key works for me so maybe it's a setting specific to IRB or the version you are using. I'm using rib version 0.9.6(09/06/30)