You can just coerce that into an integer. No intermediate Array
required.
Ah, sweet! Crazy, too: I just tried subtracting dates and found that a
Rational was returned, but didn’t know you could coerce it into an
integer. Thanks so much Chris! (And yes, it’s much faster!)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.