irb tip: get last returned value

Just use underscore.

1
2
3
4
>> "Chunky bacon"
=> "Chunky bacon"
>> _
=> "Chunky bacon"

The fruits of an investigation I started when Jon Baudanza at Rupture offered a brownie bite for the first person to figure it out. I’ll do pretty much anything for a brownie bite…

Update: you can also use conf.last_value, as well as its aliases context.last_value and irb_context.last_value.

Comments

  1. JonJune 02, 2008 @ 12:54 PM

    Brownie bite well deserved!

  2. JonahNovember 13, 2009 @ 09:56 AM

    This is awesome indeed.

  3. JamesJanuary 10, 2013 @ 02:08 AM

    Congratulations on earning your favorite brownie bite. Rupture is one of the best social-network-gaming startups available. Thanks for the tip.


    Inroads

  4. Creative BioscienceMarch 09, 2013 @ 10:44 PM

    Many common terms for seeds and fruit do not correspond to the botanical classifications. In botany, seeds are ripened ovules; fruits are the ripened ovaries or carpels that contain the seeds and a nut is a type of fruit and not a seed. Thanks.

  5. nothingbutbrandnames.com/March 24, 2013 @ 05:06 AM

    Numerous normal terms for seeds and products of the soil don’t compare to the plant groupings. In natural science, seeds are matured ovules; apples and oranges are the aged ovaries or carpels that hold the seeds and a nut is a sort of leafy foods a seed. Much obliged!

  6. Cheap Ray BanApril 01, 2013 @ 11:58 PM

    The material is an important part of glasses. Lens material this exposition or glass lens.

  7. unlockedpokerApril 11, 2013 @ 01:23 AM

    Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article.

  8. sharinaApril 16, 2013 @ 04:48 AM

    Its “essence” is an uncompromising drive to optimize for productivity and happiness. It’s a hard-learned pragmatism: processes for people who refuse to solve the same problem twice, who are annoyed enough by the speed bumps their click here tools sometimes introduce that they happily gas up the steamroller.

  9. computer science dissertationMay 21, 2013 @ 03:44 PM

    What a way to show the things in a manner.

  10. iMacLand Privacy PolicyMay 25, 2013 @ 11:35 PM

    Hi, I do think this is a great blog. I stumbledupon it ;) I will revisit yet again since I book marked it. Money and freedom is the best way to change, may you be rich and continue to help others.

  11. busana muslimMay 26, 2013 @ 11:23 AM

    This is really good. You have elaborated the topic very well. Being someone who is associated with designing i can guarantee that this blog post is very useful for the designers.

  12. obat tradisional diabetesMay 26, 2013 @ 11:25 AM

    You’ve written a really great article here. It’s extensive, without being wordy. Just what someone getting into this field would be after. (For what it’s worth, it deserved a stumble at least

  13. borer treatment June 13, 2013 @ 02:44 PM

    A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.

Post a comment

Comment
(not published)
(optional)