tad.bochan
7/1/2005 11:59:00 AM
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: