Hi,
 I'm using the latest stable release of ruby (ruby182-15) on Windows XP
and am having problems with trying to run some  example code.
Could someone please tell me what I'm doing wrong here ?
Or is  'generator.rb'  broken ?

I'm baffled.

Example:
   require 'generator'
  # Generator from an Enumerable object
  g = Generator.new(['A', 'B', 'C', 'Z'])

Result:
================ RuntimeError =====================
c:\ruby\lib\ruby\1.8/generator.rb:96:in `call'
            @cont_next.call(nil)
c:\ruby\lib\ruby\1.8/generator.rb:96:in `yield'
            @cont_next.call(nil)
c:\ruby\lib\ruby\1.8/generator.rb:72:in `initialize'
      enum.each { |x| g.yield x }
c:\ruby\lib\ruby\1.8/generator.rb:72:in `each'
      enum.each { |x| g.yield x }
c:\ruby\lib\ruby\1.8/generator.rb:72:in `initialize'
      enum.each { |x| g.yield x }
c:\ruby\lib\ruby\1.8/generator.rb:71:in `call'
          @block = proc { |g|
c:\ruby\lib\ruby\1.8/generator.rb:83:in `initialize'
          @block.call(self)
C:\Tad\RB\gen01.rb:4:in `new'
      g = Generator.new(['A', 'B', 'C', 'Z'])
C:\Tad\RB\gen01.rb:4
      g = Generator.new(['A', 'B', 'C', 'Z'])
c:\ruby\lib\ruby\site_ruby\1.8/rubygems/custom_require.rb:18:in `require__'
        require__ path
c:\ruby\lib\ruby\site_ruby\1.8/rubygems/custom_require.rb:18:in `require'
        require__ path

=============================================
Exception: continuation called across trap

Program exited with code 101

------------------------------------------------------------------------------------
Breaks in generator.rb:
.
.
.
  # Yields an element to the generator.
  def yield(value)
    if @cont_yield = callcc { |c| c }
        @queue << value
        @cont_next.call(nil)
<--------------------------------------------- Fails here!
    end
    self
  end
.
.
.







This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.