How do I drop to the IRB prompt from a running script?

后端 未结 6 618
再見小時候
再見小時候 2020-12-23 14:19

Can I drop to an IRB prompt from a running Ruby script?

I want to run a script, but then have it give me an IRB prompt at a point in the program with the current sta

6条回答
  •  温柔的废话
    2020-12-23 14:46

    I'm quite late to the game but if you're loading a script from within irb/pry already, a simple raise also works to pop you back out to the irb/pry prompt. I use this quite often when writing one off scripts within the rails console.

提交回复
热议问题