The Zach Chadwick

  • Archive
  • RSS

irb _

How have I missed this until now?  When in Ruby’s irb, you can use ‘_’ to reference the previous result of anything.


  >> 10 + 3
  => 13
  >> _ + 2
  => 15
  >> _ / 3
  => 5
  >> 

Very useful.

    • #ruby
    • #irb
    • #programming
  • 2 years ago
  • Permalink
  • Share
    Tweet

About

Musician, programmer, and occasional photographer. This is my small attempt to help other people out with some of the same problems I have run into along the way.

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr