[Yvon Thoraval <yvon.thoravalNO-SPAM / free.fr>, 2004-03-31 10.29 CEST]
> i get a very small prob with join :
> 
> (fs stands for file.separator)
> 
> plary = Array.new
> plary << context.split(fs).compact << path.split(fs).compact <<
> "languages" << "bottles"

You realize that the first 2 elements of plary are arrays, yes?

> print "size = ", plary.size, "\n"  # -> size = 4
> 
> plary.each {|p| print p, "\n" }  # -> com-ultrid-yvonthor
>                                  # -> MaCave
>                                  # -> languages
>                                  # -> bottles
> 
> 
> pl = plary.join "/"
> 
> print "pl = ", pl, "\n"  # -> pl =
> /com-ultrid-yvonthor/MaCave/languages/bottles
> 
> i expected com-ultrid-yvonthor/MaCave/languages/bottles instead (without
> first "/")

I suppose, the variable 'context' was "/com-ultrid-yvonthor". Your
array plary is [["", "com-ultrid-ivonthor"], ["MaCave"], "languages",
"bottles"].

#join seems to flatten the array before joining. So, the first element
is the empty string.

#compact only removes nils, not empty strings. You should try another
way to remove empty strings. Probably using #reject or #delete_if.

#<< doesn't concatenate arrays; it only appends its argument to the
end of the array. To concatenate you can use #+ or #concat.

Good luck.