Mastering Enumerable, Part 1

Flashcard 3 of 7

What is the real name of mystery_method? (It's found in Enumerable.)

names = %w(ben thom joe mark)

names.mystery_method { |name| name.length }
#=> { 3 => ["ben", "joe"], 4 => ["thom", "mark"] }

Answer:

Reveal Answer