# frozen_string_literal: true require 'circle_array/version' module Circle class Error < StandardError; end class Array < ::Array def [](index) result = super return result if result return nil if size.zero? self[index - size] end end end