MonkeeSage <MonkeeSage / gmail.com> wrote:

> Well, you were right and wrong. ;) If you run that script (or a ruby
> script) from the directory where it lives at, you get just the filename
> in $0, since the base path is '.'; but cd .. and run it, and then
> you'll get a full path. Confusing? ;)

not at all.

a question apart from that (but linked to)

my script "direct.rb" lies in ~/bin/rb

when using it i do :

require '/Users/yvon/bin/rb/direct.rb'

or :

require "ENV['HOME']/bin/rb/direct.rb"

which isn't "direct" )))

my ENV['HOME']/bin  is in my PATH

i know also their is a LOAD_PATH within Ruby.

then, the question :

what kind of var i've to setup in order to be able to write :

require 'direct'

and avoiding warnings of rubygems ???

notice i don't want my "~/bin/rb" being in the PATH...
-- 
une bue