我想找到我的剧本要等到用户点击回车键时使用if...end
`gets`not工作,如果... end`statement
input = 3
if input > 2
puts "input is greater than 2"
gets
puts "this shouldn't appear before I type ENTER"
end
这并不方式工作,我得到
$input is greater than 2
$this shouldn't appear before I type ENTER
我应该怎么用,而不是gets
暂停脚本?
谢谢你的时间
,您在控制台看什么?或从一个文件? – 2013-02-08 11:36:16
代码对我来说暂停。是否有更多的代码? – 2013-02-08 11:47:26