peter-murach/github — pull request #142 by hannahhoward (2013-12-10 01:29:15+00:00)
Title: Utilize descendants tracker

The existing method for finding descendant classes (used for GithubError) traverses the entire memory store, and moreover, it was causing unpredictable behavior in our app (specifically, calling service_error.errors in /Users/hannah/projects/github/lib/github_api/response/raise_error.rb was raising "ArgumentError (comparison of Class with Class failed)". In the course of researching the problem I discovered that the Twitter gem (https://github.com/sferik/twitter/issues/475) had faced an almost identical issue and their solution was to use the descendants-tracker gem, which offers a much more efficient way to track descendents of a class. Unfortunately I wasn't able to reproduce the specific fail in a test (in our app, it appears an instance of a class from one of our gems causes the error), but this does fix the issue in our app, and seems like a better way to find descendants.