Question: I realize my communicating skills are not that brilliant (I'm having issues even trying to look up for that), so I let the code speak: 

```
easy_as_123 = ("a".."c").to_a
10.times do |j|
  if j >= easy_as_123.length
    puts "j is #{j}, letter is #{easy_as_123[j % easy_as_123.length]}"
  else 
    puts "j is #{j}, letter is #{easy_as_123[j]}"
  end
end

```

is there a more elegant and concise solution to keep iterating over and over my [a,b,c] array?

edit, that code I posted works, that's exactly the result I'm looking for, but it's not concise nor good looking, are there methods capable of achieving in more elegant ways that same result?

Answer: 
[`Enumerable#cycle`](http://ruby-doc.org/core-2.3.1/Enumerable.html#method-i-cycle) is your friend here. Infinite loop:

```
(?a..?c).cycle.with_index do |letter, j|
  puts "j is #{j}, letter is #{letter}"
end

```

to break a loop after 10 iterations:

```
(?a..?c).cycle.with_index do |letter, j|
  break if j >= 10
  puts "j is #{j}, letter is #{letter}"
end

```

using `#take` (credits to @Stefan):

```
(?a..?c).cycle.take(10).each.with_index do |letter, j|
  puts "j is #{j}, letter is #{letter}"
end

```

other way round:

```
enum = (?a..?c).cycle
10.times do |j|
  puts "j is #{j}, letter is #{enum.next}"
end

```

without `#cycle`:

```
enum = (?a..?c).to_a
10.times do |j|
  puts "j is #{j}, letter is #{enum[j % enum.length]}"
end

```

---

Comments:

* `if` is redundant;
* `to_a` is redundant, ranges might be enumerated.
Define an infinite loop within a new instance of [`Enumerator`](http://ruby-doc.org/core-2.3.1/Enumerator.html#method-i-peek):

```
enum = Enumerator.new do |y|
  j = 0
  arr = ['a','b','c'].cycle
  loop do
    y << "j is #{j}, letter is #{arr.next}"
    j += 1
  end
end

enum.next #=> "j is 0, letter is a"
enum.next #=> "j is 1, letter is b"
enum.next #=> "j is 2, letter is c"
enum.next #=> "j is 3, letter is a"

```

Want to go back to the beginning? Use [`Enumerator#rewind`](http://ruby-doc.org/core-2.3.1/Enumerator.html#method-i-rewind):

```
enum.rewind
enum.next #=> "j is 0, letter is a"

```

Output the first ten iterations by using `take`:

```
puts enum.take 10 #=> 
# j is 0, letter is a
# j is 1, letter is b
# j is 2, letter is c
# j is 3, letter is a
# j is 4, letter is b
# j is 5, letter is c
# j is 6, letter is a
# j is 7, letter is b
# j is 8, letter is c
# j is 9, letter is a

```

Or use `times` and `next`:

```
10.times { p enum.next } #=>
# "j is 0, letter is a"
# "j is 1, letter is b"
# "j is 2, letter is c"
# "j is 3, letter is a"
# "j is 4, letter is b"
# "j is 5, letter is c"
# "j is 6, letter is a"
# "j is 7, letter is b"
# "j is 8, letter is c"
# "j is 9, letter is a"

```