hamstergem / hamster

Efficient, Immutable, Thread-Safe Collection classes for Ruby
Other
1.89k stars 94 forks source link

add Hamster::Hash#dig #216

Closed HParker closed 8 years ago

HParker commented 8 years ago

Part of #212

Hamster::Hash#dig matching ruby 2.3.0

I am not experienced with the branching convention or documentation style, so I would appreciate advice there.

HParker commented 8 years ago

I responded to the comments and squished the commits.

alexdowad commented 8 years ago

I think this is ready to merge. Yes, it would be nice to unify the code between Hash and Vector, but I think that can be done in a separate PR. @dubek, would you like to merge?

dubek commented 8 years ago

Does it make sense to add dig to the Associable module we already have? On Dec 7, 2015 00:56, "Alex Dowad" notifications@github.com wrote:

I think this is ready to merge. Yes, it would be nice to unify the code between Hash and Vector, but I think that can be done in a separate PR. @dubek https://github.com/dubek, would you like to merge?

— Reply to this email directly or view it on GitHub https://github.com/hamstergem/hamster/pull/216#issuecomment-162418117.

alexdowad commented 8 years ago

Does it make sense to add dig to the Associable module

It does. dig is about recursive retrieval from nested, associable structures.

dubek commented 8 years ago

Merged manually ( 500928ea887793960977a000ae9a937197e1cbc1 ).

@HParker thanks a lot for your contribution to Hamster (and the explanations about Ruby 2.3 shenanigans)! If you'd like to continue working on it, I suggest (in a new PR):

  1. writing specs for Vector#dig
  2. implementing #dig in the Associable module and removing it from Hamster::Hash.