【发布时间】:2016-12-24 05:11:29
【问题描述】:
我面临以下问题:
将每个变量设置为 true 或 false,具体取决于您希望表达式在 true 和 false 周围返回不带引号的值。
代码如下所示:
# test_1 = 77 != 77
test_1 = is/true 77 != 77
# test_2 = -4 <= -4
test_2 = is/true -4 <= -4
# test_3 = true -44 < -33
test_3 = is/true -44 <-33
# test_4 = false100 == 1000
test_4 = is/true 100 <= 1000
我不断收到此语法错误:
unexpected integer expecting $end
我对 Ruby 完全陌生。非常感谢任何帮助。
【问题讨论】:
标签: ruby