Tag: 运算符优先

为什么“真实或真实与错误”似乎同时存在真假?

我得到以下内容: puts true or true and false # >> true 而我也得到: if true or true and false puts “that’s true!” else puts “that’s false!” end # >> that’s false! 为什么true or true and false都是false (如薛定谔的猫)?