<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_io.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>Fix handling of `error`/`errno` in `io_internal_wait`. (#12961)</title>
<updated>2025-03-27T22:23:31+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2025-03-23T00:42:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aa7380f9d8a9a37d7c4d8f827d8b119c0ffbb6f2'/>
<id>aa7380f9d8a9a37d7c4d8f827d8b119c0ffbb6f2</id>
<content type='text'>
[Bug #21195]</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21195]</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure IO.copy_stream buffer is an independent string</title>
<updated>2025-03-03T22:01:09+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2025-02-18T01:23:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=eb8ee7c189d051e656f781ce2775ede1157edd6a'/>
<id>eb8ee7c189d051e656f781ce2775ede1157edd6a</id>
<content type='text'>
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>
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>[Bug #20924] Fix reading with delimiter in wide character encodings</title>
<updated>2024-12-10T14:57:57+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-10T14:57:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e90b447655dd39ad1eb645cdaae450efd605db00'/>
<id>e90b447655dd39ad1eb645cdaae450efd605db00</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20869] Discard read buffer and encoding converters at seeking</title>
<updated>2024-11-07T12:03:37+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-11-07T12:03:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee29aade1a432cbd5e4d5ec6ea6ccb4fa87361be'/>
<id>ee29aade1a432cbd5e4d5ec6ea6ccb4fa87361be</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20802] Copy encodings at reopen as well</title>
<updated>2024-11-07T10:33:41+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-11-07T10:33:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1701ddea73cf482289361c7559ad42e2694f65f1'/>
<id>1701ddea73cf482289361c7559ad42e2694f65f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20787] Check the separator in `IO#readline` as well as 3.2</title>
<updated>2024-10-07T02:06:44+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-10-07T02:06:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=773d140f65c1c8b726e107915bc003c186f38677'/>
<id>773d140f65c1c8b726e107915bc003c186f38677</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20708] Retry `open` on EINTR</title>
<updated>2024-09-04T01:42:48+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-09-03T11:19:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=37d7ae06afb03ae5508bfd81033961559886bd6b'/>
<id>37d7ae06afb03ae5508bfd81033961559886bd6b</id>
<content type='text'>
Co-Authored-By: Martin Dorey &lt;martin.dorey@hds.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Martin Dorey &lt;martin.dorey@hds.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use ruby to suppress a warning message by cmd.exe</title>
<updated>2024-08-22T07:32:54+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-08-22T06:20:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=004c6a6ed16a66f027c12606f96153a03e624005'/>
<id>004c6a6ed16a66f027c12606f96153a03e624005</id>
<content type='text'>
It is expected that reading from command with offset fails by ESPIPE
and the pipe will be closed immediately.  While this causes the child
process to terminate by SIGPIPE usually, cmd.exe yields the message
bellow.

```
The process tried to write to a nonexistent pipe.
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is expected that reading from command with offset fails by ESPIPE
and the pipe will be closed immediately.  While this causes the child
process to terminate by SIGPIPE usually, cmd.exe yields the message
bellow.

```
The process tried to write to a nonexistent pipe.
```
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #20510] Do not count optional hash argument for `IO.new`</title>
<updated>2024-05-25T10:15:25+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-05-25T10:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0bae2f00025b6b51a9e0c9e3348d5f5d16c2aae4'/>
<id>0bae2f00025b6b51a9e0c9e3348d5f5d16c2aae4</id>
<content type='text'>
Since `IO.new` accepts one or two positional arguments except for the
optional hash argument, exclude the optional hash argument from the
check for delegation to `IO.new`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since `IO.new` accepts one or two positional arguments except for the
optional hash argument, exclude the optional hash argument from the
check for delegation to `IO.new`.
</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>
</feed>
