<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/tempfile.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/tempfile] Bump up v0.3.1</title>
<updated>2024-11-18T04:28:47+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-11-18T04:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=572eebf603877161d46352328752c5c9542ac65b'/>
<id>572eebf603877161d46352328752c5c9542ac65b</id>
<content type='text'>
https://github.com/ruby/tempfile/commit/297bdf2c8d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/tempfile/commit/297bdf2c8d
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/tempfile] Stop using `IO::NULL` for feature detection</title>
<updated>2024-11-18T04:19:40+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>kateinoigakukun@gmail.com</email>
</author>
<published>2024-11-15T20:51:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6c142d05fa7446cccffc36d81b3ca98ae6199c83'/>
<id>6c142d05fa7446cccffc36d81b3ca98ae6199c83</id>
<content type='text'>
`IO::NULL`'s underlying file `/dev/null` is not always available on
WASI, so use of the file on top-level code (introduced in
https://github.com/ruby/tempfile/pull/36) causes tempfile library not
to work at all on WASI.

https://github.com/ruby/tempfile/commit/d50939890e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`IO::NULL`'s underlying file `/dev/null` is not always available on
WASI, so use of the file on top-level code (introduced in
https://github.com/ruby/tempfile/pull/36) causes tempfile library not
to work at all on WASI.

https://github.com/ruby/tempfile/commit/d50939890e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/tempfile] Bump up v0.3.0</title>
<updated>2024-11-06T07:47:49+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-11-06T07:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7e167b3225312410dcd8c303aa1ca9a904eeff6e'/>
<id>7e167b3225312410dcd8c303aa1ca9a904eeff6e</id>
<content type='text'>
https://github.com/ruby/tempfile/commit/2ff9b3ccef
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/tempfile/commit/2ff9b3ccef
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/tempfile] Support anonymous tempfile on earlier than Ruby 3.2</title>
<updated>2024-08-26T02:49:02+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-08-23T15:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=136cbf04419acf993357701e54712f921a294355'/>
<id>136cbf04419acf993357701e54712f921a294355</id>
<content type='text'>
https://github.com/ruby/tempfile/commit/7052805029
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/tempfile/commit/7052805029
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/tempfile] File.new(fileno, mode: mode, path: path) is provided from Ruby 3.2</title>
<updated>2024-08-23T06:07:40+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-08-23T05:58:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7812732e2c271732b96e285584ba84eb236c647a'/>
<id>7812732e2c271732b96e285584ba84eb236c647a</id>
<content type='text'>
https://github.com/ruby/tempfile/commit/67ce897727
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/tempfile/commit/67ce897727
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/tempfile] Don't unlink in finalizer when already unlinked</title>
<updated>2024-08-20T18:37:53+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-08-20T18:37:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1d68a735a262dba3d6222cfd664b80db2a33fc60'/>
<id>1d68a735a262dba3d6222cfd664b80db2a33fc60</id>
<content type='text'>
https://github.com/ruby/tempfile/commit/f677941ea2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/tempfile/commit/f677941ea2
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/tempfile] Add FinalizerManager to manage finalizers</title>
<updated>2024-08-20T18:07:42+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-08-20T17:28:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a68331e7036d7ab433778bf65eb854aabd5009c4'/>
<id>a68331e7036d7ab433778bf65eb854aabd5009c4</id>
<content type='text'>
As @jeremyevans pointed out for commit eb2d8b1:

&gt; Each Tempfile instance has a separate File instance and file descriptor:
&gt;
&gt;   t = Tempfile.new
&gt;   t.to_i # =&gt; 6
&gt;   t.dup.to_i =&gt; 7

FinalizerManager will keep track of the open File objects for the
particular file and will only unlink the file when all of the File objects
have been closed.

https://github.com/ruby/tempfile/commit/753ab16642
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As @jeremyevans pointed out for commit eb2d8b1:

&gt; Each Tempfile instance has a separate File instance and file descriptor:
&gt;
&gt;   t = Tempfile.new
&gt;   t.to_i # =&gt; 6
&gt;   t.dup.to_i =&gt; 7

FinalizerManager will keep track of the open File objects for the
particular file and will only unlink the file when all of the File objects
have been closed.

https://github.com/ruby/tempfile/commit/753ab16642
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/tempfile] Ensure finalizer order in Tempfile</title>
<updated>2024-08-20T13:28:36+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-08-15T16:17:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=41b427a2648ed2e049952450c698be917e0bb125'/>
<id>41b427a2648ed2e049952450c698be917e0bb125</id>
<content type='text'>
The Closer and Remover finalizers are defined on different objects in
Tempfile. The Closer is defined on the Tempfile object while the Remover
is defined on the finalizer_obj. This means that there is no guarantee
of the finalizer order.

On Windows, we must close the file before removing it because we cannot
remove an open file. But since the order is not guaranteed, the GC may
run the Remover finalizer first, which will fail with an Errno::EACCES
(Permission denied @ apply2files).

This commit changes it so that both the Closer and Remover finalizers
are defined on the finalizer_obj, which guarantees the order that it is
ran.

https://github.com/ruby/tempfile/commit/eb2d8b1175
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Closer and Remover finalizers are defined on different objects in
Tempfile. The Closer is defined on the Tempfile object while the Remover
is defined on the finalizer_obj. This means that there is no guarantee
of the finalizer order.

On Windows, we must close the file before removing it because we cannot
remove an open file. But since the order is not guaranteed, the GC may
run the Remover finalizer first, which will fail with an Errno::EACCES
(Permission denied @ apply2files).

This commit changes it so that both the Closer and Remover finalizers
are defined on the finalizer_obj, which guarantees the order that it is
ran.

https://github.com/ruby/tempfile/commit/eb2d8b1175
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Allow linking to File#path in Tempfile.create</title>
<updated>2024-07-23T18:26:34+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-23T18:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=47c0df9c4ab2ff6a437ef462eae5ca1eb77fffab'/>
<id>47c0df9c4ab2ff6a437ef462eae5ca1eb77fffab</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix code formatting for Tempfile.create</title>
<updated>2024-07-23T18:25:15+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-07-23T18:25:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c00990869f7104f5016ec4b35bfebfd27626b2e5'/>
<id>c00990869f7104f5016ec4b35bfebfd27626b2e5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
