In the AsyncModule code (p169), “rescue => error” won’t rescue if the reader is using MiniTest::Assertions. Without an explicit class name to rescue, “rescue => error” will behave as “rescue StandardError => e”, and because MiniTest::Assertion does not sub-class StandardError (“MiniTest::Assertion < Exception”) the MiniTest raised exception will not be rescued.
I worked through the entire book using MiniTest (instead of rspec-expectations), and this is the only code which posed a problem. Given the discussion of other assertion libraries on p59 “Matt says: Choosing Your Assertion Library”, it might be worth helping readers who choose MiniTest.
module AsyncSupport … begin yield rescue Exception => e end … end