Update enumeration intro

The enumeration and the output does not match on the ruby enumeration intro page. I propose updating the map block by adding a period (“.”) to match the output example.

#{index}. #{word}" to match 0. the

words = %w[the cat sat on the mat]
list = words.map.with_index do |word, index|
“#{index} #{word}”
end

puts list

Output:

0. the

1. cat

2. sat

3. on

4. the

5. mat

Formatting that with a codeblock gives:

#{index}. #{word}" to match 0. the

words = %w[the cat sat on the mat]
list = words.map.with_index do |word, index|
“#{index} #{word}”
end

puts list

# Output:

# 0. the

# 1. cat

# 2. sat

# 3. on

# 4. the

# 5. mat

The files on the repository that you will want to look is:

concepts/enumeration/introduction.md
concepts/enumeration/about.md

From the GitHub - exercism/ruby: Exercism exercises in Ruby. repository.

Did you want to submit a pull request?

If so, please reference this forum post on Github and let us know the URL here as well, so the loop is complete, if you decide to work on this.

I also suggest, while we are there, attending to the trailing white space that exists in both of these files that really should not be there.

If not, let me know, I might pick it up, it would be a good patch!

yeah, I’ll submit a PR for it.

1 Like

Applied. Thank you!