hamstergem/hamster — pull request #93 by alexdowad (2014-06-02 12:03:08+00:00)
Title: Hash#merge works when passed a Ruby Hash

In issue #84, it was requested to make `Hamster::Hash#merge` work when passed a Ruby Hash. This patch does the trick.

Why it works may not be obvious at first glance -- it's because of the way that Ruby passes parameters to blocks. (When a single `Array` argument is passed to a block which expects multiple params, it is *automatically* splatted. That is what makes the call to `#each` in the below code work both for Ruby Hashes, which yield key-value pair Arrays, and for Hamster::Hashes, which pass keys and values as separate parameters.)

Fixes #84.