phpspec/phpspec — pull request #327 by whisller (2014-03-19 13:31:16+00:00)
Title: Fix state matcher throwing method not found under hhvm for closures

This patch fixes state matcher by checking if the subject is
a callable. Under hhvm, callables will pass the first condition
of support for state matcher, which causes the matcher to
attempt to call an isCallable method on the callable itself.

This is not the wanted behaviour, the beCallable should be picked
up for support by the scalar matcher, and this is not
happening because is_object returns true in the state matcher
under hhvm. With this patch this is no longer the case
and phpspec will work as expected under hhvm.