From: Joel VanderWerf Date: 2007-05-21T04:26:05+09:00 Subject: Re: Pathname ascend and descend inclusive parameter TRANS wrote: > I would like to suggest that Pathname#ascend and Pathname#descend > have an inclusion-flag parameter added to them to specify if the given > path should be included in the iteration or not. The default could be > true for backward compatibility. Eg. > > Pathname.new('/path/to/some/file.rb').ascend {|v| p v} > # > # > # > # > # > > Pathname.new('/path/to/some/file.rb').ascend(false) {|v| p v} > # > # > # > # The following gives the same output: path = Pathname.new('/path/to/some/file.rb') path.parent.ascend {|v| p v} Is it better in some cases to control this behavior by argument passing rather than by calling an extra method? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407