This project is archived and is in readonly mode.

#2838 ✓resolved
Levin Alexander

ActiveSupport::Duration#inspect for zero length duration

Reported by Levin Alexander | June 25th, 2009 @ 09:49 PM | in 2.x

calling inspect for a duration of 0.seconds returns an empty string. This surprised me. I'd have expected one of the following:

  • '0 seconds' (or minutes/hours/years)
  • '0'

The attached patch (against master) makes 0.seconds.inspect return "0 seconds"

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages