From: Wayne Blair Date: 2001-05-29T17:10:09+09:00 Subject: [ruby-talk:15913] Re: Dir[] matz@zetabits.com (Yukihiro Matsumoto) writes: > Hi, > > In message "[ruby-talk:15894] Dir[]" > on 01/05/29, "Todd Smith" writes: > > |I can get a list of files to be returned from a line such as: > | > |files = Dir["C:/dir1/dir2/*"] > | > |but this won't work: > | > |files = Dir["C:/dir dir1/next dir2/*"] > | > |How do I deal with paths that have spaces in them? > > Hmm, ruby 1.7 allows you to escape space by \. > > files = Dir["C:/dir\\ dir1/next dir2/*"] > > Should I backport it? But allowing backslash escaping may bother > path separator on Windows platforms (that's why I didn't port it). > > matz. Have you considered only allowing the backslash escaping in charsets, or allowing space in charset? Wayne