Ask A Question

Notifications

You’re not receiving notifications from this thread.

Arrays in Ruby Discussion

Discussion for Arrays in Ruby

That underscore tip is really handy!

Reply

Yes! I love that one! :)

Reply

I forget about it all the time. Nice to get the reminder! : )

Reply

agreed, but what scenario would we use this in?

Reply

Any scenario where you want to forgot to save the last thing returned in your console or IRB session to a variable. You can also call methods on _ and they will be sent to whatever the last returned object/result was from your console session.

Reply

Indeed, I very much agree with you

Reply

The undersore tip is super handy! Will definitely be using this. Thank you!!!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.