# Ruby-stemp - Secure tempfile extension for Ruby

**URL:** <https://www.ruby-forum.com/t/ruby-stemp-secure-tempfile-extension-for-ruby/76489>\
**Category:** Ruby\
**Created:** [November 19, 2006, 5:12pm UTC](https://www.ruby-forum.com/t/ruby-stemp-secure-tempfile-extension-for-ruby/76489 "2006-11-19T17:12:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/97f17d/32.png) [@Cian](https://www.ruby-forum.com/u/Cian)\
**Post date:** [November 19, 2006, 5:12pm UTC](https://www.ruby-forum.com/t/ruby-stemp-secure-tempfile-extension-for-ruby/76489/1 "2006-11-19T17:12:51Z")

</div>

Hi all,

I’ve just released ruby-stemp, a secure tempfile extension for Ruby.

Pure Ruby tempfile implementations appear to suffer from well-known  
race conditions. The ‘mkstemp’ family of functions now popular on  
Linux & \*BSD attempt to work around these issues. This module makes  
them available to Ruby programmers on platforms where they are  
present.

This is a Ruby extension in C that simply wraps mkdtemp(3), mkstemp(3)  
and tmpfile(3). It ought to be useful to people writing Ruby code who  
need tempfiles/directories without the usual check-name-then-create  
race condition.

Project page, documentation, etc. is at [http://ruby-stemp.rubyforge.org/](http://ruby-stemp.rubyforge.org/)

Do let me know if you find this extension useful, or come across any  
problems. Thanks!

Cian
