<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_io.rb, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 5f77f9bea61fb4cc8447a76e191fdfb28f076862: [Backport #21195]</title>
<updated>2025-03-30T03:11:59+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-03-30T03:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=51dee044c1cb079a463118c5113ae9fdf96e463e'/>
<id>51dee044c1cb079a463118c5113ae9fdf96e463e</id>
<content type='text'>
	Fix handling of `error`/`errno` in `io_internal_wait`. (#12961)

	[Bug #21195]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix handling of `error`/`errno` in `io_internal_wait`. (#12961)

	[Bug #21195]
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) f423f6e10c0c226dfed98e7cb7a5d489191dfa35: [Backport #21131]</title>
<updated>2025-03-16T11:35:27+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-03-16T11:10:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f85e5e01bafeca387e833b9d79cab43a8b22aa3d'/>
<id>f85e5e01bafeca387e833b9d79cab43a8b22aa3d</id>
<content type='text'>
	Ensure IO.copy_stream buffer is an independent string

	Otherwise, changes to the buffer by the destination write method
	could result in data changing for supposedly independent strings.

	Fixes [Bug #21131]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Ensure IO.copy_stream buffer is an independent string

	Otherwise, changes to the buffer by the destination write method
	could result in data changing for supposedly independent strings.

	Fixes [Bug #21131]
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) e90b447655dd39ad1eb645cdaae450efd605db00: [Backport #20924]</title>
<updated>2025-01-15T01:53:38+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-01-15T01:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=00147cbab567b05b8a4137875bbda341ef704760'/>
<id>00147cbab567b05b8a4137875bbda341ef704760</id>
<content type='text'>
	[Bug #20924] Fix reading with delimiter in wide character encodings
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20924] Fix reading with delimiter in wide character encodings
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 773d140f65c1c8b726e107915bc003c186f38677: [Backport #20787]</title>
<updated>2025-01-15T01:38:34+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-01-15T01:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=233014639793cb6c8650a9b17d37bc09c662d430'/>
<id>233014639793cb6c8650a9b17d37bc09c662d430</id>
<content type='text'>
	[Bug #20787] Check the separator in `IO#readline` as well as 3.2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20787] Check the separator in `IO#readline` as well as 3.2
</pre>
</div>
</content>
</entry>
<entry>
<title>Move IO#readline to Ruby</title>
<updated>2023-09-28T17:43:45+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2023-09-18T21:44:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d3574c117a637a4456aa3ee78e24d8df510b9355'/>
<id>d3574c117a637a4456aa3ee78e24d8df510b9355</id>
<content type='text'>
This commit moves IO#readline to Ruby.  In order to call C functions,
keyword arguments must be converted to hashes.  Prior to this commit,
code like `io.readline(chomp: true)` would allocate a hash.  This
commits moves the keyword "denaturing" to Ruby, allowing us to send
positional arguments to the C API and avoiding the hash allocation.

Here is an allocation benchmark for the method:

```
x = GC.stat(:total_allocated_objects)
File.open("/usr/share/dict/words") do |f|
  f.readline(chomp: true) until f.eof?
end
p ALLOCATIONS: GC.stat(:total_allocated_objects) - x
```

Before this commit, the output was this:

```
$ make run
./miniruby -I./lib -I. -I.ext/common  -r./arm64-darwin22-fake  ./test.rb
{:ALLOCATIONS=&gt;707939}
```

Now it is this:

```
$ make run
./miniruby -I./lib -I. -I.ext/common  -r./arm64-darwin22-fake  ./test.rb
{:ALLOCATIONS=&gt;471962}
```

[Bug #19890] [ruby-core:114803]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit moves IO#readline to Ruby.  In order to call C functions,
keyword arguments must be converted to hashes.  Prior to this commit,
code like `io.readline(chomp: true)` would allocate a hash.  This
commits moves the keyword "denaturing" to Ruby, allowing us to send
positional arguments to the C API and avoiding the hash allocation.

Here is an allocation benchmark for the method:

```
x = GC.stat(:total_allocated_objects)
File.open("/usr/share/dict/words") do |f|
  f.readline(chomp: true) until f.eof?
end
p ALLOCATIONS: GC.stat(:total_allocated_objects) - x
```

Before this commit, the output was this:

```
$ make run
./miniruby -I./lib -I. -I.ext/common  -r./arm64-darwin22-fake  ./test.rb
{:ALLOCATIONS=&gt;707939}
```

Now it is this:

```
$ make run
./miniruby -I./lib -I. -I.ext/common  -r./arm64-darwin22-fake  ./test.rb
{:ALLOCATIONS=&gt;471962}
```

[Bug #19890] [ruby-core:114803]
</pre>
</div>
</content>
</entry>
<entry>
<title>Deprecate Kernel#open and IO support for subprocess creation/forking</title>
<updated>2023-08-10T00:38:11+00:00</updated>
<author>
<name>Mike Dalessio</name>
<email>mike.dalessio@gmail.com</email>
</author>
<published>2023-06-07T14:05:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d2343368ab7e270118ea6baa9c6418bfed83135c'/>
<id>d2343368ab7e270118ea6baa9c6418bfed83135c</id>
<content type='text'>
Deprecate Kernel#open and IO support for subprocess creation and
forking. This deprecates subprocess creation and forking in

- Kernel#open
- URI.open
- IO.binread
- IO.foreach
- IO.readlines
- IO.read
- IO.write

This behavior is slated to be removed in Ruby 4.0

[Feature #19630]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Deprecate Kernel#open and IO support for subprocess creation and
forking. This deprecates subprocess creation and forking in

- Kernel#open
- URI.open
- IO.binread
- IO.foreach
- IO.readlines
- IO.read
- IO.write

This behavior is slated to be removed in Ruby 4.0

[Feature #19630]
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve `read`/`write`/`pread`/`pwrite` consistency. (#7860)</title>
<updated>2023-05-27T09:48:47+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2023-05-27T09:48:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bf1bc5362e5edb2321665e9ce7c5c4e2e7d9f5ef'/>
<id>bf1bc5362e5edb2321665e9ce7c5c4e2e7d9f5ef</id>
<content type='text'>
* Documentation consistency.

* Improve consistency of `pread`/`pwrite` implementation when given length.

* Remove HAVE_PREAD / HAVE_PWRITE - it is no longer optional.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Documentation consistency.

* Improve consistency of `pread`/`pwrite` implementation when given length.

* Remove HAVE_PREAD / HAVE_PWRITE - it is no longer optional.</pre>
</div>
</content>
</entry>
<entry>
<title>Remvoe very high timeout on test_race_gets_and_close</title>
<updated>2023-05-26T05:51:23+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>ktsanaktsidis@zendesk.com</email>
</author>
<published>2023-05-26T02:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d1628feaaf1bfa9ed8cbd0f4fd14a7cc802b3cc1'/>
<id>d1628feaaf1bfa9ed8cbd0f4fd14a7cc802b3cc1</id>
<content type='text'>
This test should be fixed and fast now because the closing thread sleeps
appropriately waiting for the file descriptor to be unused.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test should be fixed and fast now because the closing thread sleeps
appropriately waiting for the file descriptor to be unused.
</pre>
</div>
</content>
</entry>
<entry>
<title>Raise ArgumentError if IO.read is provided negative offset</title>
<updated>2023-03-24T19:29:00+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2023-02-10T18:33:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6c60006de5cfd75f10a1b4a3d822e2de41d22db6'/>
<id>6c60006de5cfd75f10a1b4a3d822e2de41d22db6</id>
<content type='text'>
Fixes [Bug #19380]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #19380]
</pre>
</div>
</content>
</entry>
<entry>
<title>s/mjit/rjit/</title>
<updated>2023-03-07T07:44:01+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-03-07T07:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=23ec248e48f696ae986e2b19cd572ece02a5ba55'/>
<id>23ec248e48f696ae986e2b19cd572ece02a5ba55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
