re: The Useful & Hidden '_' Command In Ruby VIEW POST

FULL DISCUSSION
 

It's not a Ruby method, it's an irb (Ruby interactive prompt or REPL) shortcut for the result of the last evaluated expression. _ doesn't have such a meaning in a regular Ruby program.

 

Hey Dmitry. Yep you are absolutely right! The _ expression cannot be used in regular Ruby programs. I'll update the post to add a clarifying statement about this point. Thanks!

code of conduct - report abuse