这很奇怪。我没有看到任何关于在课程中使用'my'的文档。任何人都可以解释下面的内容。
1.9.3-p547 :006 > reser = Date.today
=> Thu, 18 Dec 2014
1.9.3-p547 :011 > Reservation.where { start_date >= reser }.count
(0.8ms) SELECT COUNT(*) FROM "reservations" WHERE "reservations"."start_date" >= '2014-12-18'
=> 63
1.9.3-p547 :012 > Reservation.where { start_date >= my { reser } }.count
(0.8ms) SELECT COUNT(*) FROM "reservations" WHERE "reservations"."start_date" >= '2014-12-18'
=> 63