remove die definition and use in doc tests

review? @brson
Issue #4524