在Ruby中,“or”和“||”不是同一件事吗?当我执行代码时,得到了不同的结果。
line =""
if (line.start_with? "[" || line.strip.empty?)
puts "yes"
end
line =""
if (line.start_with? "[" or line.strip.empty?)
puts "yes"
end