diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-28 11:54:37 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-28 11:54:37 +0000 |
commit | 2fcb3dd2406a4a28554c2069b8cab141e24317fa (patch) | |
tree | def53dc6fbf7c8db105de8d400ce6ea306a61110 /lib/tmpdir.rb | |
parent | d6e3cf74e07b77c232d7650f05083021a670330c (diff) | |
download | ruby-2fcb3dd2406a4a28554c2069b8cab141e24317fa.tar.gz ruby-2fcb3dd2406a4a28554c2069b8cab141e24317fa.tar.xz ruby-2fcb3dd2406a4a28554c2069b8cab141e24317fa.zip |
* lib/tmpdir.rb: use return value of getdir.call for length.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tmpdir.rb')
-rw-r--r-- | lib/tmpdir.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb index 3042ed520..434d1bf05 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 |