class

NilAssertionError

Inherits Exception / Reference / Object

Raised when a not_nil! assertion fails.

"hello".index('x').not_nil! # raises NilAssertionError ("hello" does not contain 'x')