<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_io_buffer.rb, branch v3_2_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) 35e124832e29b65c84d4e0e4e434616859f9bdf5: [Backport #20755]</title>
<updated>2024-10-18T04:57:08+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-10-18T04:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=087e4ed6cc9da9cfca1a107058905446ff474bd1'/>
<id>087e4ed6cc9da9cfca1a107058905446ff474bd1</id>
<content type='text'>
	[Bug #20755] Frozen string should not be writable via IO::Buffer
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20755] Frozen string should not be writable via IO::Buffer
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 637067440f74043c6d79fc649ab8acf1afea25a5: [Backport #20752]</title>
<updated>2024-10-18T02:30:05+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-10-18T02:30:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5777fe5ab57d6479326bdb21ef9a6b88ea1516dc'/>
<id>5777fe5ab57d6479326bdb21ef9a6b88ea1516dc</id>
<content type='text'>
	[Bug #20752] Slice of readonly `IO::Buffer` also should be readonly
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #20752] Slice of readonly `IO::Buffer` also should be readonly
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `IO::Buffer` tests for read and write with length &amp; offset.</title>
<updated>2024-10-04T01:09:39+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2024-10-03T11:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3d4d5c8d8cca0c290a234fb3c47c035822b18add'/>
<id>3d4d5c8d8cca0c290a234fb3c47c035822b18add</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix `io_buffer_get_string` default length computation. (#8427)</title>
<updated>2024-05-18T11:09:56+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2023-09-14T08:37:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0e664ebcd36879591223d1ecbb181aa05d82a4d9'/>
<id>0e664ebcd36879591223d1ecbb181aa05d82a4d9</id>
<content type='text'>
* Fix `io_buffer_get_string` default length computation.

When an offset bigger than the size is given, the resulting length will be
computed incorrectly. Raise an argument error in this case.

* Validate all arguments.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix `io_buffer_get_string` default length computation.

When an offset bigger than the size is given, the resulting length will be
computed incorrectly. Raise an argument error in this case.

* Validate all arguments.</pre>
</div>
</content>
</entry>
<entry>
<title>Improvements to `IO::Buffer` `read`/`write`/`pread`/`pwrite`. (#7826)</title>
<updated>2024-05-18T11:09:56+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2023-05-24T01:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=67d499a7646a4f2f5294b6c83ac9503fcd873270'/>
<id>67d499a7646a4f2f5294b6c83ac9503fcd873270</id>
<content type='text'>
- Fix IO::Buffer `read`/`write` to use a minimum length.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fix IO::Buffer `read`/`write` to use a minimum length.</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 19346c2336053b351673da030b00c704138252d8: [Backport #19754]</title>
<updated>2023-10-28T02:57:52+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-10-28T02:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8bbf909bb561732057b533cee1618b14886e07ba'/>
<id>8bbf909bb561732057b533cee1618b14886e07ba</id>
<content type='text'>
	[Bug #19754] Make `IO::Buffer#get_string` check `offset` range
	 (#8016)

	---
	 io_buffer.c                 | 3 +++
	 test/ruby/test_io_buffer.rb | 8 ++++++++
	 2 files changed, 11 insertions(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19754] Make `IO::Buffer#get_string` check `offset` range
	 (#8016)

	---
	 io_buffer.c                 | 3 +++
	 test/ruby/test_io_buffer.rb | 8 ++++++++
	 2 files changed, 11 insertions(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) bd786e78969f9d4a8699376ceafe10934b6ad533: [Backport #19084]</title>
<updated>2023-07-16T07:50:13+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-07-16T07:50:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c911cbd6c3dcc80def61ab48be1815cd910fc91b'/>
<id>c911cbd6c3dcc80def61ab48be1815cd910fc91b</id>
<content type='text'>
	Fix mutation on shared strings. (#7837)

	---
	 io_buffer.c                 | 19 ++++++++++++-------
	 test/ruby/test_io_buffer.rb |  4 ----
	 2 files changed, 12 insertions(+), 11 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix mutation on shared strings. (#7837)

	---
	 io_buffer.c                 | 19 ++++++++++++-------
	 test/ruby/test_io_buffer.rb |  4 ----
	 2 files changed, 12 insertions(+), 11 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 09295ea796900fb7b05d29e93364090e21598566: [Backport #19543]</title>
<updated>2023-07-16T07:42:12+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-07-16T07:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c13757ed9ae02a2d03aea91bb852397aa920f3fd'/>
<id>c13757ed9ae02a2d03aea91bb852397aa920f3fd</id>
<content type='text'>
	IO::Buffer#resize: Free internal buffer if new size is zero (#7569)

	`#resize(0)` on an IO::Buffer with internal buffer allocated will
	result in calling `realloc(data-&gt;base, 0)`. The behavior of `realloc`
	with size = 0 is implementation-defined (glibc frees the object
	and returns NULL, while BSDs return an inaccessible object). And
	thus such usage is deprecated in standard C (upcoming C23 will make it
	UB).

	To avoid this problem, just `free`s the memory when the new size is zero.
	---
	 io_buffer.c                 |  5 +++++
	 test/ruby/test_io_buffer.rb | 18 ++++++++++++++++++
	 2 files changed, 23 insertions(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	IO::Buffer#resize: Free internal buffer if new size is zero (#7569)

	`#resize(0)` on an IO::Buffer with internal buffer allocated will
	result in calling `realloc(data-&gt;base, 0)`. The behavior of `realloc`
	with size = 0 is implementation-defined (glibc frees the object
	and returns NULL, while BSDs return an inaccessible object). And
	thus such usage is deprecated in standard C (upcoming C23 will make it
	UB).

	To avoid this problem, just `free`s the memory when the new size is zero.
	---
	 io_buffer.c                 |  5 +++++
	 test/ruby/test_io_buffer.rb | 18 ++++++++++++++++++
	 2 files changed, 23 insertions(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix missing handling of offset argument in `IO::Buffer` `pread` and `pwrite`. (#7012)</title>
<updated>2022-12-23T18:52:10+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2022-12-23T18:52:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=11ad9a42d76ba785b2ec93f327469ead9b810ef4'/>
<id>11ad9a42d76ba785b2ec93f327469ead9b810ef4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Omit test on IO Buffers which relies on String being embedded</title>
<updated>2022-11-10T15:11:34+00:00</updated>
<author>
<name>Jemma Issroff</name>
<email>jemmaissroff@gmail.com</email>
</author>
<published>2022-11-08T20:35:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9986697b621e5345177a1c395489dcc9fab8602b'/>
<id>9986697b621e5345177a1c395489dcc9fab8602b</id>
<content type='text'>
There is currently a bug ([#19084]) in how extended strings work in
IO Buffers. Object Shapes changes will make the string in this test
extended on 32 bit machines. Since this behavior is currently broken
(unrelated to object shapes) on 32 bit machines, this test will then
fail. We preemptively omit it so that this commit can be reverted
once the bug is fixed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is currently a bug ([#19084]) in how extended strings work in
IO Buffers. Object Shapes changes will make the string in this test
extended on 32 bit machines. Since this behavior is currently broken
(unrelated to object shapes) on 32 bit machines, this test will then
fail. We preemptively omit it so that this commit can be reverted
once the bug is fixed.
</pre>
</div>
</content>
</entry>
</feed>
