File.expand_path has some weird behaviour on my system (1.6.4 and 1.7.1):

File.expand_path "/foo/bar."     # => "/foo/bar"
File.expand_path "/foo/bar.."    # => "/foo"
File.expand_path "/foo./bar"     # => "/foo/bar"
File.expand_path "/foo../bar"    # => "/bar"

Am I missing something? These are all valid absolute paths.

-- 
Lars Christensen, larsch / cs.auc.dk