I monitor changes to the Wikipedia doctest page, and so noticed a change in the Ruby implementation of doctest. Scooting around their implementation I found that they have an !!! special directive that says drop into the interpreter at this point when testing allowing debugging in context. http://github.com/tablatom/rubydoctest/wikis/special-directives - Paddy.