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.

ghorner's latest activity

Thursday, February 03 2011
6366 ActiveSupport::OrderedHash#each* methods without block are incorrect in 1.8 was updated in Ruby on Rails
  • ghorner
    • Tag set to patch
    by ghorner at 4:40 AM
  • ghorner
    ghorner created the ticket at 4:34 AM

    In ruby 1.8.x, ordered hashes don't behave like normal hashes when calling each* methods without a block:

    >> {:a => 1}.each
    => #<Enumerable::Enumerator:0x25637...
Wednesday, February 02 2011
6364 [PATCH] ActiveSupport::OrderedHash#each* methods don't return self was updated in Ruby on Rails
  • ghorner
    • Title changed from ActiveSupport::OrderedHash#each* methods don't return self to [PATCH] ActiveSupport::OrderedHash#each* methods don't return self
    • Tag set to patch
    by ghorner at 3:25 PM
  • ghorner
    ghorner created the ticket at 3:21 PM

    I noticed while using Enumerable#group_by that ordered hashes don't act like normal hashes. Specifically, their each* methods return their keys instead of self:

    ...