> if leapi%4 == 0 && (leapi%400 == 0 || leapi%100 != 0)
>         puts leapi
> else
> end
>
> while (leapi + (4 - leapi%4)) <= leapf
>         leapi = (leapi + (4 - leapi%4))
>         if leapi%4 == 0 && (leapi%400 == 0 || leapi%100 != 0)
>                 puts leapi
>         else
>         end
> end

(leapi..leapf).select do |x|
  (x % 4 == 0) && (x % 100 != 0) || (x % 400 == 0)
end

-- 
Christoffer Sawicki
http://vemod.net/