summaryrefslogtreecommitdiff
path: root/lib/tmpdir.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-28 11:54:37 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-28 11:54:37 +0000
commit58b331d3778bdc59557ff77ba2d93f865af3e46a (patch)
tree780baea4e3367e1289422802ac6f41c0b0afe152 /lib/tmpdir.rb
parent7c896e039a6ddbd48eed4489c9fac2035d004d27 (diff)
* lib/tmpdir.rb: use return value of getdir.call for length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tmpdir.rb')
-rw-r--r--lib/tmpdir.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb
index 3042ed5..434d1bf 100644
--- a/lib/tmpdir.rb
+++ b/lib/tmpdir.rb
@@ -17,8 +17,8 @@ class Dir
rescue RuntimeError
getdir = Win32API.new('kernel32', 'GetWindowsDirectory', 'PL', 'L')
end
- getdir.call(windir, windir.size)
- windir = File.expand_path(windir.rstrip.untaint)
+ len = getdir.call(windir, windir.size)
+ windir = File.expand_path(windir[0, len])
temp = File.join(windir, 'temp')
@@systmpdir = temp if File.directory?(temp) and File.writable?(temp)
rescue LoadError