Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyEnumerable and custom eachSingle-choice MCQ

A class includes Enumerable and its each returns an enumerator when no block is given. Which of these methods is NOT available for free from that single each definition?

class C include Enumerable def each return to_enum(:each) unless block_given? yield 3; yield 1; yield 2 end end