1 ruby console-application exit
是否有 ruby 命令告诉 ruby 脚本自行关闭?我想做的是:说我正在跑步ruby.rb
print "What would you like to do next?"
next=gets.chomp
next.downcase!
if next=="close"
#this is where i want to be able to tell the program to close itself.
end
Run Code Online (Sandbox Code Playgroud)
有没有办法做到这一点?如果有,那是什么?
| 归档时间: |
|
| 查看次数: |
3907 次 |
| 最近记录: |