[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

Re: Pathname ascend and descend inclusive parameter

From: Joel VanderWerf <vjoel@...>
Date: 2007-05-20 19:26:05 UTC
List: ruby-core #11212
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:/path/to/some/file.rb>
>    #<Pathname:/path/to/some>
>    #<Pathname:/path/to>
>    #<Pathname:/path>
>    #<Pathname:/>
> 
> Pathname.new('/path/to/some/file.rb').ascend(false) {|v| p v}
>    #<Pathname:/path/to/some>
>    #<Pathname:/path/to>
>    #<Pathname:/path>
>    #<Pathname:/>

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

In This Thread