Ruby 2.7 introduced an update to IRB
that allows multiline editing. How can I add a new line into a multiline method to inject code between two previous statements?
E.g.
2.7.1 :019 > while session = server.accept
2.7.1 :020 > session.puts "Hello World! The time is #{Time.now}"
2.7.1 :021 > session.close
2.7.1 :022 > end
How do I add a new line before line 21's session.close
so I can do something like session.puts "closing connection"
?