srawlins/allocation_stats — pull request #1 by griffindy (2013-12-06 16:47:16+00:00)
Title: Allow compatibility with BasicObject and descendants.

If you try to use `AllocationStats.trace` and any descendant of `BasicObject` (but not `Object`) is created during the block, it will fail from calling `object_id` and `send`. `BasicObject` does not implement those two methods, but does use `__id__` and `__send__`.

That was a simple refactor. The slightly more complicated problem is that `BasicObject#class` does not exist. I found a way to implement `#class` by referencing the __superclass__ of a `BasicObject`'s __eigenclass__.

Let me know if there's anything else you want me to add to the pull request.

* use `#__id__` instead of `#object_id`
* use `#__send__` instead of `#send`
* monkey patch `BasicObject` to give it #class using this hack found here:
http://stackoverflow.com/a/10216927