From: Robert Klemme Date: 2007-06-08T05:45:04+09:00 Subject: Re: What about a 'series' type? On 07.06.2007 21:41, Robert Dober wrote: > On 6/7/07, Robert Klemme wrote: > > Robert I hope you do not mind my fantasy about/over/at??? your theme. Not at all. I had thought about the limit myself but did not want to bother implementing it. Two remarks about your code: You include Enumerable but do not provide #each which is required. You use instance variables for the iteration which is a bad thing because this needless restricts usability (namely in the light of multiple threads). Array and other's also do not store the iteration state in instance variables but in local variables in method #each. You can try it with something like this which would not work if instance variables would be used for storing iteration state a=(1..10).to_a 2.times {|i| Thread.new(i) {|j| a.each {|x| puts "[#{j}-#{x}]"; sleep 0.5}}} Kind regards robert