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.

[PATCH] Date.advance modifies option hash

#1133

ActiveSupport::CoreExtensions::Date::Calculations.advance modifies it's option hash

Reported by jedediah · September 29th, 2008 @ 10:37 AM

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

Activity

  1. josh
    josh
    • State changed from new to incomplete

    Seems like a tiny patch worth committing. Can you please whip up a diff and some tests?

    December 20th, 2008 @ 05:29 PM

  2. jedediah
    jedediah
    • Assigned user set to josh

    How do you feel about making this change across the whole API? As in, fixing every method that modifies it's options? There are quite a few that do it. I've fixed a good chunk of them already but I thought I'd check before I go any further in case I'm wasting my time.

    December 23rd, 2008 @ 03:55 PM

  3. josh
    josh
    • Assigned user cleared.

    August 19th, 2009 @ 03:44 PM

  4. John Pignata
    John Pignata
    • Tag changed from activesupport, bug to activesupport, bug, patch
    • Assigned user set to josh
    • Title changed from Date.advance modifies option hash to [PATCH] Date.advance modifies option hash

    Here's a patch for 2-3-stable and master to close this minor issue.

    August 19th, 2009 @ 04:34 PM

  5. Repository
    Repository
    • State changed from incomplete to resolved

    (from [7316d029e60f5d531b35af9e66d233ea19e4f240]) Duplicating the options hash in Date#advance to prevent modification of the original [#1133 [PATCH] Date.advance modifies option hash state:resolved]

    Signed-off-by: Joshua Peek josh@joshpeek.com
    http://github.com/rails/rails/commit/7316d029e60f5d531b35af9e66d233...

    August 31st, 2009 @ 07:02 PM

  6. Repository