hamstergem/hamster — pull request #98 by alexdowad (2014-06-28 12:46:36+00:00)
Title: Hash.empty works on subclasses which have never been insubstantiated

This fixes a little corner-case bug in `Hamster::Hash`...

```
[1] pry(main)> require 'hamster'
=> true
[2] pry(main)> class H < Hamster::Hash; end
=> nil
[3] pry(main)> H.empty
=> nil
[4] pry(main)> H.new
=> {}
[5] pry(main)> H.empty
=> {}
```

See? When you subclass `Hamster::Hash`, `empty` only works on the subclass after you have called `new` at least once.

I'm opening a PR to get comments from others on code style, etc. before committing this to `master`.