$0 global variable

I would really like to be able to do this:

if FILE == $0

require File.dirname(FILE) + ‘/…/…/Util/simple_test.rb’

end

But, since $0 currently always returns nil, I can’t.

Any chance you could squeeze it into the next SVN revision?

Cheers,

Pete

Peter Bacon D.:

I would really like to be able to do this:

if FILE == $0
require File.dirname(FILE) + ‘/…/…/Util/simple_test.rb’
end

But, since $0 currently always returns nil, I can’t.

Any chance you could squeeze it into the next SVN revision?

John L. has ARGV working–presumably it’s not too hard to make $0 work
too.

  • John

Thanks Johns. I have worked around it so it is not so important now.
Nearly got the rest of the number stuff done. Look out for a big new
year
patch soon.
Pete