gpt4 book ai didi

ruby , pry : Can I add something to the command `pry example.rb` so pry automatically goes interactive when it finishes executing the script?

转载 作者:数据小太阳 更新时间:2023-10-29 08:49:42 25 4
gpt4 key购买 nike

如果遇到异常(例如,如果您只是在脚本末尾放置一个 undefined variable “x”),Pry 会进入交互模式。

(此外,如果在脚本本身内您需要'pry' 并将binding.pry 放在您想要进行交互的位置。)

但我想知道:当我在命令提示符下输入 pry example.rb 命令时,是否有某种标志/选项/参数可以添加到命令中,所以它会当它到达执行any example.rb 脚本的末尾时开始交互,不管里面是什么? (当然,假设结束前没有异常。)

(这显然对与可以从 Notepad++ 等运行外部程序的编辑器一起使用特别有用,请参阅 thisthis。)

最佳答案

还没有,但是提交一个issue我会添加它:)

关于 ruby , pry : Can I add something to the command `pry example.rb` so pry automatically goes interactive when it finishes executing the script?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16212147/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com