case opts[:i] when Range (_pry_.input_ring[opts[:i]] || []).join when Integer _pry_.input_ring[opts[:i]] || "" else raise Pry::CommandError, "Not a valid range: #{opts[:i]}" end end _pry_.input_ring というオブジェクトから取得しているっぽい
line 55: Owner: Pry::Ring Visibility: public Number of lines: 11 def [](index) @mutex.synchronize do return @buffer[(count + index) % max_size] if index.is_a?(Integer) return @buffer[index] if count <= max_size # Swap parts of array when the array turns page and starts overwriting # from the beginning, then apply the range. last_part = @buffer.slice([index.end, max_size - 1].min, count % max_size) (last_part + (@buffer - last_part))[index] end end