This Is Not the Type You're Looking For (Exceptional Creatures)
Ruby’s TypeError
is raised when encountering an object that is not of the expected type. TypeError
appears in many other places, such as when converting one type to another using built-in conversion functions like Integer()
and Hash()
. Check out an example of using TypeError in some Ruby code.
Post a comment