The block form of Enumerator in 1.9 introduces a new wrapper object,
Enumerator::Yielder, which is passed as an explicit parameter to the block:

    Enumerator.new do |yielder|
      ...
      yielder.yield 123    # or: yielder << 123
      yielder.yield 456
      ...
    end

The Yielder just wraps the block which is to receive the data, transforming
:yield or :<< into :call.

It occurs to me, would this not be simpler if you just passed the block
which is to receive the data, using the existing (1.9) mechanism for this?

    Enumerator.new do |&receiver|
      ...
      receiver.call 123    # or: receiver[123]
      receiver.call 456
      ...
    end

I guess the downside is that this syntax can't be used under 1.8. But it
seems a bit less obfuscated to me.

Regards,

Brian.

## the example from ri19 Enumerator.new, recoded without Yielder ##

class MyEnum
  include Enumerable
  def initialize(&block)
    @block = block
  end
  def each(*args, &target)
    @block.call(*args, &target)
  end
end

fib = MyEnum.new { |&yields|
  a = b = 1
  loop {
    yields[a]
    a, b = b, a + b
  }
}

p fib.take(10)