这是我所做的:
output = "xyz"
result = false
unless output == "" || output.nil? || output == "{}" || result == true
puts 'execute this command'
end
如果Ruby中存在类似的||
条件,那么收缩上述语句的最简单格式是什么?>
这是我所做的:输出=“ xyz”结果= false,除非输出==“” || output.nil? ||输出==“ {}” ||结果== true将“执行此命令”放在末尾。...
这样的事情?
在较新版本的Ruby中,您有使用吗?这样: