我昨天提出的一个问题的答案是下面这段Ruby代码: def overlap?(r1,r2) r1.include?(r2.begin) || r2.include?(r1.begin) end def any_overlap?(ranges) ranges.sort_by(&:begin).each_cons(2).any? do |r1,r2| overlap?(r1, r2) end end 我得到each_cons ,但奇怪的是&:begin符号? 救我从句法地狱! 谢谢!