[#19457] equality between "a" and Exception.new("a") — Tanaka Akira <akr@...17n.org>

ふと気がついたのですが、

39 messages 2003/02/02
[#19460] Re: equality between "a" and Exception.new("a") — matz@... (Yukihiro Matsumoto) 2003/02/03

まつもと ゆきひろです

[#19473] Re: equality between "a" and Exception.new("a") — Tanaka Akira <akr@...17n.org> 2003/02/04

In article <1044245817.592933.31973.nullmailer@picachu.netlab.jp>,

[#19474] Re: equality between "a" and Exception.new("a") — matz@... (Yukihiro Matsumoto) 2003/02/04

まつもと ゆきひろです

[#19475] Re: equality between "a" and Exception.new("a") — Tanaka Akira <akr@...17n.org> 2003/02/04

In article <1044329220.257740.28127.nullmailer@picachu.netlab.jp>,

[#19476] Re: equality between "a" and Exception.new("a") — matz@... (Yukihiro Matsumoto) 2003/02/04

まつもと ゆきひろです

[#19477] Re: equality between "a" and Exception.new("a") — Tanaka Akira <akr@...17n.org> 2003/02/04

In article <1044331431.138035.28173.nullmailer@picachu.netlab.jp>,

[#19478] Re: equality between "a" and Exception.new("a") — matz@... (Yukihiro Matsumoto) 2003/02/04

まつもと ゆきひろです

[#19479] Re: equality between "a" and Exception.new("a") — Tanaka Akira <akr@...17n.org> 2003/02/04

In article <1044332948.099873.28206.nullmailer@picachu.netlab.jp>,

[#19482] Re: equality between "a" and Exception.new("a") — matz@... (Yukihiro Matsumoto) 2003/02/04

まつもと ゆきひろです

[#19486] Re: equality between "a" and Exception.new("a") — Tanaka Akira <akr@...17n.org> 2003/02/04

In article <1044338964.502066.28474.nullmailer@picachu.netlab.jp>,

[#19491] Re: equality between "a" and Exception.new("a") — matz@... (Yukihiro Matsumoto) 2003/02/04

まつもと ゆきひろです

[#19493] Re: equality between "a" and Exception.new("a") — matz@... (Yukihiro Matsumoto) 2003/02/04

まつもと ゆきひろです

[#19556] compare between String and Exception — Tanaka Akira <akr@...17n.org> 2003/02/12

さらに気が付いたのですが、

[#19514] [Oniguruma] Version 1.7.1 — "K.Kosako" <kosako@...>

ftp.ruby-lang.orgに、onigd20030207.tar.gzを置きました。

19 messages 2003/02/07

[#19548] [PATCH] file.c for (PR#389) and (PR#390) — nobu.nakada@...

なかだです。

20 messages 2003/02/11
[#19572] Re: [PATCH] file.c for (PR#389) and (PR#390) — pegacorn@... 2003/02/14

From: nobu.nakada@nifty.ne.jp

[#19648] Re: SEGV at search_method in eval.c (PR#400) — nobu.nakada@...

なかだです。

13 messages 2003/02/24

[ruby-dev:19609] Re: [PATCH] file.c for (PR#389) and (PR#390)

From: nobu.nakada@...
Date: 2003-02-19 14:43:03 UTC
List: ruby-dev #19609
なかだです。

At Wed, 19 Feb 2003 22:53:51 +0900,
pegacorn@jcom.home.ne.jp wrote:
> UNC での ".." はこうなるはずではないかと思いますが、どうでしょうか?
> 
> File.expand_path("..", "//machine/share") => "//machine/share"

たしかに、
ruby -C //machine/share -e 'p Dir.pwd' => "//machine/share"
になるようですし。


Index: file.c
===================================================================
RCS file: //sharui/cvs/ruby/src/ruby/file.c,v
retrieving revision 1.138
diff -u -2 -p -r1.138 file.c
--- file.c	17 Feb 2003 04:27:45 -0000	1.138
+++ file.c	19 Feb 2003 14:19:47 -0000
@@ -1495,5 +1495,5 @@ file_expand_path(fname, dname, result)
     VALUE fname, dname, result;
 {
-    char *s, *buf, *b, *p, *pend;
+    char *s, *buf, *b, *p, *pend, *root;
     long buflen;
     int tainted;
@@ -1620,4 +1620,13 @@ file_expand_path(fname, dname, result)
 	*p = '/';
 
+    p[1] = 0;
+#ifdef DOSISH_UNC
+    if (isdirsep(buf[0]) && isdirsep(buf[1])) {
+	if (*(root = nextdirsep(buf + 2))) root = nextdirsep(root + 1);
+    }
+    else
+#endif
+	root = skiproot(buf);
+
     b = s;
     while (*s) {
@@ -1633,5 +1642,5 @@ file_expand_path(fname, dname, result)
 			/* We must go back to the parent */
 			*p = '\0';
-			if (!(b = strrdirsep(buf))) {
+			if (!(b = strrdirsep(root))) {
 			    *p = '/';
 			}


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread