Exception: TypeError

Inherits:
StandardError show all
Defined in:
error.c,
error.c

Overview

Raised when encountering an object that is not of the expected type.

[1, 2, 3].first("two")

raises the exception:

TypeError: no implicit conversion of String into Integer

Method Summary

Methods inherited from Exception

#==, #backtrace, #backtrace_locations, #cause, #exception, exception, #initialize, #inspect, #message, #set_backtrace, #to_s

Constructor Details

This class inherits a constructor from Exception