I am using Rails 2.3.8 with jRuby for a project. and I regularly use rails consoleto test my classes and APIs, somewhere I have one problem. when I work in the Rails console, if I mistakenly enter several multi-line commands, is there a way to cancel it somewhere in the middle?
eg:.
>> [1,2,3,4].inject(1){
?>
All I found will be expecting me to finish the whole completed expression, but all I want to do is cancel all current statements.
I tried Ctrl + C, but this did not work for me.
Any advice would be greatly appreciated.
source
share