Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveSupport::Duration#inspect for zero length duration

#2838

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"

Reported by Levin Alexander · June 25th, 2009 @ 09:49 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved

    (from [ab2d6abb55b45543656e2a0238857d3ba8379257]) make #inspect if zero length duration return '0 seconds' instead of empty string [#2838 ActiveSupport::Duration#inspect for zero length duration state:resolved]

    Signed-off-by: Yehuda Katz + Carl Lerche ykatz+clerche@engineyard.com
    http://github.com/rails/rails/commit/ab2d6abb55b45543656e2a0238857d...

    July 2nd, 2009 @ 07:25 PM

  2. Repository