闰年 2015/05/21 15223 def leap? year (year%4 == 0) and !(year%100 == 0 and year%400 != 0) end puts leap? 1978 # false puts leap? 1988 # true puts leap? 1900 # false puts leap? 2000 # true