When you’re playing around in IRB or Rails Console, you might come up with an output that you wanted to save as a variable, but didn’t (you’re playing around after all!). Now you have to retype your long statement all over again and this time save it to a variable.

So let’s get into IRB (just type irb in your terminal), type your name as a string, and press enter. Oh wait, but you wanted to save your name to a variable called name! Your choice is to just type name = “YOUR NAME” or click the up arrow to get the last input, then go to the beginning of the line (Control + A) and assign the name that way. Both are tedious and not fun. Feel free to do this just to feel the pain.