Paul Brannan <pbrannan / atdesk.com> writes:

>   if not defined?(x) then x = '' end
>   x << './'
>   require "#{x}#{__FILE__}"
> 
> 
> This will load the SAME FILE over 100 times.

That's because you're giving it a different name each time. The first
time it's called ./x, the second time ././x, the third time ./././x
and so on.

In Rubicon, I need to search the current directory and it's parent, so
I do

   $: << File.dirname($0) << File.join(File.dirname($0), "..")

   require '....'

Perhaps something similar might work for you.


Regards


Dave