IndexError
IndexError has not been discovered yet
Raised when the given index is invalid.
a = [:foo, :bar] a.fetch(0) #=> :foo a[4] #=> nil a.fetch(4) #=> IndexError: index 4 outside of array bounds: -2...2
IndexError has not been discovered yet
Raised when the given index is invalid.
a = [:foo, :bar] a.fetch(0) #=> :foo a[4] #=> nil a.fetch(4) #=> IndexError: index 4 outside of array bounds: -2...2
Join us on our quest to discover all of Ruby's Exceptional Creatures! Society members will receive new creatures as we discover them (we'll be adding more in the coming months). Oh, and you'll learn a lot about Ruby, too.