]> git.wincent.com - mkdtemp.git/commitdiff
Don't write directly to Ruby String object storage
authorWincent Colaiuta <win@wincent.com>
Sun, 6 Dec 2009 13:26:11 +0000 (14:26 +0100)
committerWincent Colaiuta <win@wincent.com>
Sun, 6 Dec 2009 13:26:11 +0000 (14:26 +0100)
Rather than overwriting part of the buffer that Ruby uses to store the
template String, create a temporary C string for use with mkdtemp.

In practice, there has never been a problem with this kind of direct
manipulation of Ruby String storage with any version of Ruby that I have
tested, but just to be future-proof we err on the side of caution here.

Signed-off-by: Wincent Colaiuta <win@wincent.com>

No differences found