# Tempfile.new("foo") --\> /tmp/foo123.0 \*NOT\* /tmp/foo.123.0 like docs says

**URL:** <https://rubytalk.org/t/tempfile-new-foo-tmp-foo123-0-not-tmp-foo-123-0-like-docs-says/28046>\
**Category:** ruby-talk\
**Created:** [7 June 2006 05:09 UTC](https://rubytalk.org/t/tempfile-new-foo-tmp-foo123-0-not-tmp-foo-123-0-like-docs-says/28046 "2006-06-07T05:09:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philip\_Hallstrom](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@Philip\_Hallstrom](https://rubytalk.org/u/Philip_Hallstrom)\
**Post date:** [7 June 2006 05:09 UTC](https://rubytalk.org/t/tempfile-new-foo-tmp-foo123-0-not-tmp-foo-123-0-like-docs-says/28046/1 "2006-06-07T05:09:04Z")

</div>

Hi all -

Just noticed that the documentation for Tempfile.new says:

&nbsp;&nbsp;&nbsp;Creates a temporary file of mode 0600 in the temporary directory whose  
&nbsp;&nbsp;&nbsp;name is basename.pid.n ....

But it's actually basenamepid.n. Line 70 of tempfile.rb says:

&nbsp;&nbsp;&nbsp;sprintf('%s%d.%d', basename, $$, n)

Who and where should I let know about this?

Thanks!

-philip

---

<div class="post-metadata">

**Author:** ![Yukihiro\_Matsumoto2](https://avatars.discourse-cdn.com/v4/letter/y/b9e5f3/32.png) [@Yukihiro\_Matsumoto2](https://rubytalk.org/u/Yukihiro_Matsumoto2)\
**Post date:** [7 June 2006 07:21 UTC](https://rubytalk.org/t/tempfile-new-foo-tmp-foo123-0-not-tmp-foo-123-0-like-docs-says/28046/2 "2006-06-07T07:21:53Z")

</div>

Hi,

> **···**
>
> In message "Re: Tempfile.new("foo") --\> /tmp/foo123.0 \*NOT\* /tmp/foo.123.0 like docs says..." on Wed, 7 Jun 2006 14:09:04 +0900, Philip Hallstrom \<ruby@philip.pjkh.com\> writes:
> 
> > Just noticed that the documentation for Tempfile.new says:
> > 
> > &nbsp;&nbsp;Creates a temporary file of mode 0600 in the temporary directory whose  
> > &nbsp;&nbsp;name is basename.pid.n ....
> > 
> > But it's actually basenamepid.n. Line 70 of tempfile.rb says:
> > 
> > &nbsp;&nbsp;sprintf('%s%d.%d', basename, $$, n)
> 
> Hmm, it's a documentation error. Thank you for the report.
> 
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matz.
