In Python, you can use a field _to capture the last calculated value. This is really useful in IDLE. Does Ruby have an IRB equivalent?
_
An example from Python:
>>> 2 + 2 4 >>> _ 4 >>> "Me " + "You" 'Me You' >>> _ 'Me You'
_ does not work?
host:~ user$ irb irb(main):001:0> s = "test" => "test" irb(main):002:0> puts _ test => nil
In IRB you can also use _.
Source: https://habr.com/ru/post/1788615/More articles:IPhone icon icon without a number - iosWhat is a good OOP visual tutorial? - oopProblem with overlay gcc template - gccRuby: что простой способ проверить все значения в 2D-массиве одинаковые в конкретном столбце или строке? - rubyHow and where to store a nhibernate session in winforms per request - asp.netPerhaps a port? (gloomy fandandroido) - androidShort Unique Identifiers - language-agnosticWhat version of Visual Studio Express for JScript.NET? - visual-studioDiv / CSS position does not update after javascript processing - javascriptHow to download preview Honeycomb SDK? - androidAll Articles