From: matz@... (Yukihiro Matsumoto) Date: 2001-10-28T08:50:54+09:00 Subject: [ruby-talk:23653] Re: Path class (was: Re: FileSpec vs Dir/File class methods) Hi, In message "[ruby-talk:23640] Re: Path class (was: Re: FileSpec vs Dir/File class methods)" on 01/10/28, Michael Witrant writes: | * Some other methods: | - #read() | if a block is given: like #open(filename) | else: return the content of the file | | - #write(data = nil) | if data is not nil: write data to file | else: like #open(filename, 'w') (and a block must be given) They are probably confusing. I think it's better to separate open-like methods from read/write methods. |- Should String#path be renamed String#to_path? "path" sounds fine for me (if I need to add method to String). |- Should #join (and #/) remove duplicate slashes? | ie: '/bar/'.path.join('foo') => '/bar//foo' or '/bar/foo'? | File::join does not. File::join does not do canonicalization. File::extend_path does. |- Any other remark or suggestion? If you provide Path#to_str, pathes can be used like strings. matz.