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.

.days == .seconds bug

#1509

Hi,

Running on Rails 2.2.2 and get the following while in console:

Loading development environment (Rails 2.2.2)

5.years.days => 157788000.0 days 5.years.seconds => 157788000.0 seconds

Strange?

Reported by PommyTom · December 3rd, 2008 @ 12:56 AM

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

Activity

  1. Geoff Buesing
    Geoff Buesing
    • State changed from new to invalid

    Well, you're doing something strange by calling #days and #seconds on an existing Duration object -- you're creating a new Duration based on the number of seconds in 5 years. I don't know of any reason why you'd want to do that, but this is the expected result.

    December 3rd, 2008 @ 02:29 PM