A particular line of code does not exit, and the IRB exits the >> prompt. I'm not looking for an exit from the IRB, but just to exit to the state preceding the line of code that triggered the prompt >> .
>> stop_words = %w {the a and if} >> stop_words.each{|x| stop_words << x.capitalize} quit quit quit
- As soon as I enter this situation, I canβt even exit the IRB shell, since the quit command does not make any changes.
- I would like to get out of state and still have my previous variable definitions intact, so in the sample code I could call
stop_words to experiment with it. Any clarification / understanding of what is happening here is appreciated.
source share