Please sign in to comment.
Fix failing spec in 1.8.7 and potential problem in 1.9...
"should inherit alias scopes from superclasses" creates an anonymous subclass for its test. Anonymous classes return nil for .name by default. It passed in 1.9 because Searchlogic::ActiveRecord::Scope#scopes's monkey patched `include?` was inadvertantly calling .respond_to?(key) on `result` instead of the AR class. In 1.8.7, it resulted in a syntax error `unexpected '.', expecting kEND` in `.respond_to?(key)` because name was nil. So, instead of looking up the AR class by name, now a reference to the class is passed in.
- Loading branch information...