From: Brian Hartin Date: 2008-05-24T02:55:49+09:00 Subject: Re: Pathlist separator, Windows and Unix David Mullet wrote: > Ronald Fischer wrote: >>> ENV['PATH'] returns the path statement. You could perhaps >>> query it for a >>> semicolon: >>> >>> ENV['PATH'].include?(';') >> >> I think this is not such a good idea, because the application >> could run in a restricted environment, where the PATH is either >> not set, or contains only one directory. >> >> Ronald > > Good point. > > Regardless, Lyle's suggestion of File::PATH_SEPARATOR would seem to be > the better method. > > David Except that File::SEPARATOR is not platform-dependent, as you would expect. Try it on Windows. Then try `md #{File.join("c:","foo")}`. -- Posted via http://www.ruby-forum.com/.