From: dblack@... Date: 2002-10-09T00:40:18+09:00 Subject: Re: odd edge case with require Hi -- On Tue, 8 Oct 2002, Patrick May wrote: > $ cat test.rb > require 'test.rb' > puts "Should this only be outputted once?" > > $ ruby test.rb > Should this only be outputted once? > Should this only be outputted once? > > $ ruby -v > ruby 1.6.7 (2002-03-01) [i586-mswin32] > > The above behaviour seems a bit strange to me. Try it with load instead of require :-) (infinite loop) I don't find the above strange. It only require's once, but the puts statement gets encountered twice. That corresponds to the behavior: no infinite loop, two lines of output. David -- David Alan Black | Register for RubyConf 2002! home: dblack@candle.superlink.net | November 1-3 work: blackdav@shu.edu | Seattle, WA, USA Web: http://pirate.shu.edu/~blackdav | http://www.rubyconf.com