From: ts Date: 2003-09-23T18:40:16+09:00 Subject: Re: Dir.foreach not with patterns? >>>>> "A" == Alan Davies writes: A> I'm pretty sure you can't have filenames with \n in them, and that A> pattern wouldn't match them anyway. Then test it with a real OS :-) svg% ls -a ./ ../ svg% svg% ruby -e 'Dir.mkdir "aa\n.."' svg% svg% ls -a ./ ../ aa?../ svg% svg% ruby -e 'Dir.foreach(".") {|d| p d}' "." ".." "aa\n.." svg% svg% ruby -e 'Dir.foreach(".") {|d| next if d =~ /^\.\.?$/; p d}' svg% Guy Decoux