Q:

A loop containing only even numbers

I am doing a task to generate an array of fake email addresses in a given format. 
I have managed to write a code that works for it.  Here's what my code looks like:
emails = []
(1..50).each do |i|
  puts "jean.dupont.%02d@email.fr" %[i]
  emails.push(i)
end

This generates emails that look like this:
jean.dupont.01@email.fr
jean.dupont.02@email.fr
jean.dupont.03@email.fr
...
jean.dupont.50@email.fr

I am doing another task to generate the same thing, but only containing even numbers. 
How can I add simple code to what I have, so it only gives even numbers? 

A:

If you can change the range, then step would be your friend:
emails = []
(2..50).step(2) do |i|
  puts "jean.dupont.%02d@email.fr" %[i]
  emails.push(i)
end

