[#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: [ ruby-Bugs-8676 ] File.basename fails on Windows root paths

From: gus <gus@...>
Date: 2007-05-16 13:04:21 UTC
List: ruby-core #11186
On 5/16/07 4:58 AM, "Daniel Berger" <djberg96@gmail.com> wrote:

> Nobuyoshi Nakada wrote:
>> Hi,
>> 
>> At Wed, 16 May 2007 16:38:36 +0900,
>> Daniel Berger wrote in [ruby-core:11181]:
>>> In any case, the equivalent of File.basename is PathStripPath(), though
>>> you'll need to mix it with PathRemoveExtension() if there's an extension
>>> provided. The equivalent of File.dirname is PathRemoveFileSpec(). Note
>>> that you'll need to use backslashes for those functions to work.
>> 
>> They are not equivalent
> 
> Without a suffix it looks equivalent to me. Why do you think they aren't
> equivalent?
> 
> , and the example PathStripPath() in
>> MSDN[1] seems like that the function just leaves the input
>> unchanged if it is not in expected form.
>> 
>> [1] http://msdn2.microsoft.com/en-us/library/ms628624.aspx
> 
> That's the current File.basename behavior, isn't it?
> 
> File.basename("Not a Path") # => "Not a Path"
> 
>>> To detect if a path is a root path use PathIsRoot(). This will return
>>> true for "C:\\" or "\\server\\share" or even just "\\server".
>> 
>> Doesn't it mean they are not basenames?
> 
> We have to decide whether or not the basename of a root path is itself
> as a rule. BTW, back in ruby-core: 5765 Austin also mentioned handling
> "\\.\" and "\\?\". I'm not sure if that topic has been revisited since then.
> 
What's the right goal? Is it:

1) Ruby works the same as Windows scripts on Windows and the same as UNIX
scripts on UNIX

or

2) Ruby works the same on all (Linux, UNIX, Mac OS X, Windows)

or

3) something else

regards,
gus



In This Thread

Prev Next