puppetlabs/puppet — pull request #2685 by hlindberg (2014-05-21 19:23:43+00:00)
Title: (PUP-2314)(PUP-2632) Fix assert_type's API

This improves the API of the assert_type function:
* it could not handle a Callable
* it could not handle a lambda
* Message could not be customized

Now, the assert_type supports an optional lambda that is called if the assertion fails instead of raising an error. The user can then fail with custom message, log a warning and return some other default value etc.

This PR also contains a fix to PUP-2632 which makes Type be a subtype of Object.