e$B!!$5$5$@$G$9!%e(B
e$B!!e(Btmpdir e$B=i4|2=;~!$e(BWin32API e$B$Ne(B SHGetFolderPath
e$B$G%Q%9$r<h$C$F$/$ke(B
e$B$H!$KvHx$Ke(B nul e$B$,F~$k$?$a!$e(Bexpand_path
e$B$,<:GT$9$k$h$&$G$9!Je(Brstrip e$B$7e(B
e$B$F$be(B nul e$B$O<h$l$J$$!K!%$H$j$"$($:e(B chop
e$B$7$F$7$^$C$?$s$G$9$,!$$I$&$9e(B
e$B$k$N$,NI$$$G$7$g$&$+!%e(B
Index: lib/tmpdir.rb
— lib/tmpdir.rb (e$B%j%S%8%g%se(B 19506)
+++ lib/tmpdir.rb (e$B:n6H%3%T!<e(B)
@@ -18,7 +16,7 @@
begin
getdir = Win32API.new(‘shell32’, ‘SHGetFolderPath’, ‘LLLLP’, ‘L’)
raise RuntimeError if getdir.call(0, CSIDL_LOCAL_APPDATA, 0,
0, windir) != 0
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:36493] [Bug: 1.9] tmpdir on mswin32”
on Wed, 24 Sep 2008 11:25:33 +0900, SASADA Koichi [email protected]
writes:
|e$B!!e(Btmpdir e$B=i4|2=;~!$e(BWin32API e$B$Ne(B SHGetFolderPath e$B$G%Q%9$r<h$C$F$/$ke(B
|e$B$H!$KvHx$Ke(B nul e$B$,F~$k$?$a!$e(Bexpand_path e$B$,<:GT$9$k$h$&$G$9!Je(Brstrip e$B$7e(B
|e$B$F$be(B nul e$B$O<h$l$J$$!K!%$H$j$"$($:e(B chop e$B$7$F$7$^$C$?$s$G$9$,!$$I$&$9e(B
|e$B$k$N$,NI$$$G$7$g$&$+!%e(B
rstripe$B$OKvHx$Ne(Bnule$B$r<h$k:n$j$K$J$C$F$k$O$:$G$9!#$H$j$"$($:<je(B
e$B85$G;n$7$?HO0OFb$G$O<h$l$^$9!#e(B
e$B!!$5$5$@$G$9!%e(B
Yukihiro M. wrote:
|e$B!!e(Btmpdir e$B=i4|2=;~!$e(BWin32API e$B$Ne(B SHGetFolderPath e$B$G%Q%9$r<h$C$F$/$ke(B
|e$B$H!$KvHx$Ke(B nul e$B$,F~$k$?$a!$e(Bexpand_path e$B$,<:GT$9$k$h$&$G$9!Je(Brstrip e$B$7e(B
|e$B$F$be(B nul e$B$O<h$l$J$$!K!%$H$j$"$($:e(B chop e$B$7$F$7$^$C$?$s$G$9$,!$$I$&$9e(B
|e$B$k$N$,NI$$$G$7$g$&$+!%e(B
rstripe$B$OKvHx$Ne(Bnule$B$r<h$k:n$j$K$J$C$F$k$O$:$G$9!#$H$j$"$($:<je(B
e$B85$G;n$7$?HO0OFb$G$O<h$l$^$9!#e(B
e$B!!$3$3$GF@$i$l$kJ8;zNs$O!$e(B"…\x00 " e$B$H!$KvHx$Ke(B nul +
e$B%9%Z!<%9!$$He(B
e$B$$$&9=@.$K$J$C$F$$$k$?$a!VKvHx$Ne(B nule$B!W$G$O$J$+$C$?$h$&$G$9!%e(B
str = "foo\x00 "
p [str, str.rstrip, str.rstrip.rstrip]
#=> ["foo\000 ", “foo\000”, “foo”]
e$B!!e(Brstrip 2e$B2s$d$k$N$,$$$$$s$G$7$g$&$+!%e(B
e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
In message “[ruby-dev:36495] Re: [Bug: 1.9] tmpdir on mswin32”
on Sep.24,2008 11:45:09, [email protected] wrote:
e$B!!$3$3$GF@$i$l$kJ8;zNs$O!$e(B"…\x00 " e$B$H!$KvHx$Ke(B nul + e$B%9%Z!<%9!$$He(B
e$B$$$&9=@.$K$J$C$F$$$k$?$a!VKvHx$Ne(B nule$B!W$G$O$J$+$C$?$h$&$G$9!%e(B
17e$B9TL$r!"e(B
windir = “\0”*(max_pathlen+1)
e$B$KJQ$($k$@$1$G$h$+$C$?$j$7$^$;$s$+!#e(B
e$B$=$l$G$O!#e(B
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:36495] Re: [Bug: 1.9] tmpdir on mswin32”
on Wed, 24 Sep 2008 11:45:09 +0900, SASADA Koichi [email protected]
writes:
|e$B!!$3$3$GF@$i$l$kJ8;zNs$O!$e(B"…\x00 " e$B$H!$KvHx$Ke(B nul + e$B%9%Z!<%9!$$He(B
|e$B$$$&9=@.$K$J$C$F$$$k$?$a!VKvHx$Ne(B nule$B!W$G$O$J$+$C$?$h$&$G$9!%e(B
|
|str = "foo\x00 "
|p [str, str.rstrip, str.rstrip.rstrip]
|#=> ["foo\000 ", “foo\000”, “foo”]
|
|e$B!!e(Brstrip 2e$B2s$d$k$N$,$$$$$s$G$7$g$&$+!%e(B
e$B$&!<$s!“$8$c$”!"!Ve(Brstripe$B$rKvHx$Ne(Bnule$B$+%9%Z!<%9$r:o=|!W$H$$$&;Ee(B
e$BMM$K$7$F$7$^$&e(B(1.9e$B$G$Oe(B)e$B$H$$$&$N$O$I$&$G$7$g$&$+!#e(B
e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
e$B$H$$$&$o$1$GK\7o$O2r7h$7$?$N$G$9$,!"$=$l$O$=$l$H$7$F!"e(B
In message “[ruby-dev:36497] Re: [Bug: 1.9] tmpdir on mswin32”
on Sep.24,2008 14:15:17, [email protected] wrote:
e$B$&!<$s!“$8$c$”!"!Ve(Brstripe$B$rKvHx$Ne(Bnule$B$+%9%Z!<%9$r:o=|!W$H$$$&;Ee(B
e$BMM$K$7$F$7$^$&e(B(1.9e$B$G$Oe(B)e$B$H$$$&$N$O$I$&$G$7$g$&$+!#e(B
e$B$H$$$&$N$O4r$7$$$N$G$<$R$H$b!#e(B
e$B$“$H!“e(Bstripe$B7O$Ke(Bdeletee$B$N$h$&$K0z?t$H$7$F:o=|$9$kJ8;z=89g$rEO$;e(B
e$B$k$h$&$K$9$k$H$$$&%”%$%G%”$b$“$j$^$9$,!”$3$C$A$O%9%/%j%W%H$Ne(B
e$B8_49@-$rGK2u$7$J$$$N$G!"$d$k$H$7$F$be(B1.9.1e$B0J9_$G$b$$$$$N$+$J!#e(B
e$B$=$l$G$O!#e(B
e$B%A%1%C%He(B #590 e$B$,99?7$5$l$^$7$?!#e(B (by Usaku NAKAMURA)
e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B
Applied in changeset r19513.
http://redmine.ruby-lang.org/issues/show/590
e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
In message “[ruby-dev:36500] Re: [Bug: 1.9] tmpdir on mswin32”
on Sep.24,2008 14:44:32, [email protected] wrote:
In message “[ruby-dev:36497] Re: [Bug: 1.9] tmpdir on mswin32”
on Sep.24,2008 14:15:17, [email protected] wrote:
e$B$&!<$s!“$8$c$”!"!Ve(Brstripe$B$rKvHx$Ne(Bnule$B$+%9%Z!<%9$r:o=|!W$H$$$&;Ee(B
e$BMM$K$7$F$7$^$&e(B(1.9e$B$G$Oe(B)e$B$H$$$&$N$O$I$&$G$7$g$&$+!#e(B
e$B$H$$$&$N$O4r$7$$$N$G$<$R$H$b!#e(B
e$BAaB.F~$j$^$7$?$,!"e(Blstripe$B$bF1MM$K$7$A$c$$$1$J$$$G$7$g$&$+e(B?
e$B$"$H!“85!9$”$C$?$o$1$G$9$,!"e(Bt[-1]e$B$Oe(BVC++8
x64e$B$G%P%0$k$3$H$,e(B
e$B$"$k$N$GHr$1$FM_$7$$$G$9!#e(B
e$B$=$l$G$O!#e(B
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:36503] Re: [Bug: 1.9] tmpdir on mswin32”
on Wed, 24 Sep 2008 17:02:14 +0900, “U.Nakamura”
[email protected] writes:
|e$BAaB.F~$j$^$7$?$,!"e(Blstripe$B$bF1MM$K$7$A$c$$$1$J$$$G$7$g$&$+e(B?
e$B$I!<$J$s$G$7$g$&$M$(!#$"$s$^$j:$$C$F$J$$$s$G$9$,!#e(B
|# e$B$"$H!“85!9$”$C$?$o$1$G$9$,!“e(Bt[-1]e$B$Oe(BVC++8 x64e$B$G%P%0$k$3$H$,e(B
|# e$B$”$k$N$GHr$1$FM_$7$$$G$9!#e(B
e$B$3$C$A$O;d$K$O$h$/$o$+$s$J$$$s$G!"E,Ev$K=$@5$7$F%3%_%C%H$7$Fe(B
e$B$/$@$5$$!#$I$&$7$?$i%P%0$,Hr$1$i$l$k$+CN$j$h$&$,$J$$$N$G!#e(B