Edely Gomes4,485 Points
How to cancel a statement in irb?
Sometimes when I write a statement that is missing a close quotation mark in irb, I get stucked because the irb doesn't throw an error or abort the statement.
It just keeps running and i can't cancel it and start again. So I have to close the console and initialize all from start.
What should I do to cancel the statement? I tried to write exit or escape, but nothing works.
Here is a example:
irb(main):001:0> grocery_list = ["milk", "bread", "eggs"]
=> ["milk", "bread", "eggs"]