class IndexError

Overview

Raised when the given index is invalid.

a = [:foo, :bar]
a[2] #=> IndexError: index out of bounds

Superclass hierarchy

Object
Reference
Exception
IndexError

Defined in:

Class Method Summary

Class Method Detail

def self.name : String

def self.new(message = "Index out of bounds")