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.

Hash#slice! Return Value

#971

This patch makes Hash#slice! return a difference Hash of the key-value pairs removed, rather than returning the same thing as Hash#slice. This is analogous to how Array#slice! works, and generally seems to be the "Ruby Way". It's better b/c it provides more information about what happens.

Reported by 7rans · September 4th, 2008 @ 07:15 PM

State: resolved
Milestone: 2.x
Assigned to: Frederick Cheung Frederick Cheung
Importance: none

Activity

  1. Frederick Cheung
    Frederick Cheung

    Seems reasonable to me. pushed it to my branch, hopefully will get pulled in soon

    December 19th, 2008 @ 02:28 PM

  2. Pratik
    Pratik
    • Assigned user set to Frederick Cheung

    December 22nd, 2008 @ 03:47 AM

  3. Repository
    Repository
    • State changed from new to resolved

    (from [c9d4335418823500548ad8fbc86af7c910b7644b]) MaKe Hash#slice! return removed values, akin to Array [#971 Hash#slice! Return Value state:resolved]

    Signed-off-by: Frederick Cheung frederick.cheung@gmail.com http://github.com/rails/rails/co...

    December 26th, 2008 @ 09:57 PM