Commit 14dc9175 authored by cjihrig's avatar cjihrig
Browse files

assert: throw when block is not a function

Currently, anything passed as the block argument to throws()
and doesNotThrow() is interpreted as a function, which can
lead to unexpected results. This commit checks the type of
block, and throws a TypeError if it is not a function.

Fixes: https://github.com/iojs/io.js/issues/275
PR-URL: https://github.com/iojs/io.js/pull/308


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
parent 7c4a50dd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment