[#20036] Re: Roundoff problem with Float and Marshal — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

16 messages 2003/04/18
[#20045] Re: Roundoff problem with Float and Marshal — nobu.nakada@... 2003/04/20

なかだです。

[#20063] Re: Roundoff problem with Float and Marshal — matz@... (Yukihiro Matsumoto) 2003/04/22

まつもと ゆきひろです

[#20097] jcode.rb — akira yamada / やまだあきら <akira@...>

25 messages 2003/04/26
[#20098] Re: jcode.rb — matz@... (Yukihiro Matsumoto) 2003/04/27

まつもと ゆきひろです

[#20105] Re: jcode.rb — WATANABE Hirofumi <eban@...> 2003/04/28

わたなべです。

[#20108] Re: jcode.rb — matz@... (Yukihiro Matsumoto) 2003/04/28

まつもと ゆきひろです

[ruby-dev:20025] Re: File::expand_path amok

From: WATANABE Hirofumi <eban@...>
Date: 2003-04-14 09:35:12 UTC
List: ruby-dev #20025
わたなべです。

面倒なので、ruby-devへ。

nobu.nokada@softhome.net <nobu.nokada@softhome.net> writes:

> At Mon, 14 Apr 2003 15:54:28 +0900,
> Ariff Abdullah wrote:
> > $ pwd
> > /
> > 
> > $ ruby -e 'p File.expand_path(*ARGV)' a/.. b
> > \000\000 ....
> > ....
> > ... so on so on.. \000
> > ...
> > \000\000
> 
> I couldn't reproduce it on Linux.  Does this gives same result?
> 
> $ ruby -e 'p File.expand_path(*ARGV)' b

BUFCHECKでrootも更新しないと
			 if (!(b = strrdirsep(root))) {
			     *p = '/';
			 }
			 else {
			     p = b;
			 }
の p = b; でまずいんじゃないかなあ。

Index: file.c
===================================================================
RCS file: /src/ruby/file.c,v
retrieving revision 1.142
diff -u -1 -r1.142 file.c
--- file.c	11 Apr 2003 05:49:34 -0000	1.142
+++ file.c	14 Apr 2003 09:33:05 -0000
@@ -1498,2 +1498,3 @@
     pend = buf + buflen;\
+    root = skipprefix(buf);\
 }

In This Thread

Prev Next