On Sat, 20 Mar 2004 15:57:01 +0900, Mark Hubbart wrote: [snip] > I believe that should be: > require 'rubygems' > require_gem 'iterator' > Thanks, I forgot about require_gem.. (must have been tired) In my gem release would it be a good idea to replace all occurrencies of require 'iterator' with require 'rubygems' require_gem 'iterator' so that the sample directory works ? Is there some way to automaticly load 'rubygems' when ruby starts up? -- Simon Strandgaard irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'iterator' => true irb(main):003:0> i = %w(a b c).create_iterator => #<Iterator::Collection:0x8339af8 @data=["a", "b", "c"], @position=0> irb(main):004:0> i.current => "a" irb(main):005:0> i.next => #<Iterator::Collection:0x8339af8 @data=["a", "b", "c"], @position=1> irb(main):006:0> i.current => "b" irb(main):007:0> i.has_next? => true irb(main):008:0> i.next => #<Iterator::Collection:0x8339af8 @data=["a", "b", "c"], @position=2> irb(main):009:0> i.has_next? => true irb(main):010:0> i.next => #<Iterator::Collection:0x8339af8 @data=["a", "b", "c"], @position=3> irb(main):011:0> i.has_next? => false irb(main):012:0>