<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/stringio, 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) f54369830f83a65fb54916d762883fbe6eeb7d0b, 338eb0065bd81ba8ae8b9402abc94804a24594cc, ac636f5709feb1d9d7a0c46a86be153be765cf21: [Backport #20516]</title>
<updated>2024-06-04T20:14:09+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-06-04T20:14:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1df1538be4a494bbc5ef6e3504312a0284948709'/>
<id>1df1538be4a494bbc5ef6e3504312a0284948709</id>
<content type='text'>
	Revert "Rollback to released version numbers of stringio and strscan"

	This reverts commit 6a79e53823e328281b9e9eee53cd141af28f8548.

	[ruby/strscan] StringScanner#captures: Return nil not "" for unmached capture (https://github.com/ruby/strscan/pull/72)

	fix https://github.com/ruby/strscan/issues/70
	If there is no substring matching the group (s[3]), the behavior is
	different.

	If there is no substring matching the group, the corresponding element
	(s[3]) should be nil.

	```
	s = StringScanner.new('foobarbaz') #=&gt; #&lt;StringScanner 0/9 @ "fooba..."&gt;
	s.scan /(foo)(bar)(BAZ)?/  #=&gt; "foobar"
	s[0]           #=&gt; "foobar"
	s[1]           #=&gt; "foo"
	s[2]           #=&gt; "bar"
	s[3]           #=&gt; nil
	s.captures #=&gt; ["foo", "bar", ""]
	s.captures.compact #=&gt; ["foo", "bar", ""]
	```

	```
	s = StringScanner.new('foobarbaz') #=&gt; #&lt;StringScanner 0/9 @ "fooba..."&gt;
	s.scan /(foo)(bar)(BAZ)?/  #=&gt; "foobar"
	s[0]           #=&gt; "foobar"
	s[1]           #=&gt; "foo"
	s[2]           #=&gt; "bar"
	s[3]           #=&gt; nil
	s.captures #=&gt; ["foo", "bar", nil]
	s.captures.compact #=&gt; ["foo", "bar"]
	```

	https://docs.ruby-lang.org/ja/latest/method/MatchData/i/captures.html
	```
	/(foo)(bar)(BAZ)?/ =~ "foobarbaz" #=&gt; 0
	$~.to_a        #=&gt; ["foobar", "foo", "bar", nil]
	$~.captures #=&gt; ["foo", "bar", nil]
	$~.captures.compact #=&gt; ["foo", "bar"]
	```

	* StringScanner#captures is not yet documented.
	https://docs.ruby-lang.org/ja/latest/class/StringScanner.html

	https://github.com/ruby/strscan/commit/1fbfdd3c6f

	[ruby/strscan] Bump version

	https://github.com/ruby/strscan/commit/d6f97ec102
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Revert "Rollback to released version numbers of stringio and strscan"

	This reverts commit 6a79e53823e328281b9e9eee53cd141af28f8548.

	[ruby/strscan] StringScanner#captures: Return nil not "" for unmached capture (https://github.com/ruby/strscan/pull/72)

	fix https://github.com/ruby/strscan/issues/70
	If there is no substring matching the group (s[3]), the behavior is
	different.

	If there is no substring matching the group, the corresponding element
	(s[3]) should be nil.

	```
	s = StringScanner.new('foobarbaz') #=&gt; #&lt;StringScanner 0/9 @ "fooba..."&gt;
	s.scan /(foo)(bar)(BAZ)?/  #=&gt; "foobar"
	s[0]           #=&gt; "foobar"
	s[1]           #=&gt; "foo"
	s[2]           #=&gt; "bar"
	s[3]           #=&gt; nil
	s.captures #=&gt; ["foo", "bar", ""]
	s.captures.compact #=&gt; ["foo", "bar", ""]
	```

	```
	s = StringScanner.new('foobarbaz') #=&gt; #&lt;StringScanner 0/9 @ "fooba..."&gt;
	s.scan /(foo)(bar)(BAZ)?/  #=&gt; "foobar"
	s[0]           #=&gt; "foobar"
	s[1]           #=&gt; "foo"
	s[2]           #=&gt; "bar"
	s[3]           #=&gt; nil
	s.captures #=&gt; ["foo", "bar", nil]
	s.captures.compact #=&gt; ["foo", "bar"]
	```

	https://docs.ruby-lang.org/ja/latest/method/MatchData/i/captures.html
	```
	/(foo)(bar)(BAZ)?/ =~ "foobarbaz" #=&gt; 0
	$~.to_a        #=&gt; ["foobar", "foo", "bar", nil]
	$~.captures #=&gt; ["foo", "bar", nil]
	$~.captures.compact #=&gt; ["foo", "bar"]
	```

	* StringScanner#captures is not yet documented.
	https://docs.ruby-lang.org/ja/latest/class/StringScanner.html

	https://github.com/ruby/strscan/commit/1fbfdd3c6f

	[ruby/strscan] Bump version

	https://github.com/ruby/strscan/commit/d6f97ec102
</pre>
</div>
</content>
</entry>
<entry>
<title>Rollback to released version numbers of stringio and strscan</title>
<updated>2023-12-16T04:00:59+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-12-16T04:00:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6a79e53823e328281b9e9eee53cd141af28f8548'/>
<id>6a79e53823e328281b9e9eee53cd141af28f8548</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/stringio] Development of 3.1.1 started.</title>
<updated>2023-11-28T01:38:41+00:00</updated>
<author>
<name>Sutou Kouhei</name>
<email>kou@clear-code.com</email>
</author>
<published>2023-11-28T01:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=def416899d2b72d2299ddfa97f1f94ae2594d67b'/>
<id>def416899d2b72d2299ddfa97f1f94ae2594d67b</id>
<content type='text'>
https://github.com/ruby/stringio/commit/75da93d48f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/stringio/commit/75da93d48f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/stringio] Do not compile the C extension on TruffleRuby</title>
<updated>2023-11-27T12:21:24+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2023-11-24T12:14:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1c3088117a6b22b6aa07fb8c9c28028851786c1b'/>
<id>1c3088117a6b22b6aa07fb8c9c28028851786c1b</id>
<content type='text'>
* Before this it was compiled but not used, because TruffleRuby has
  a stringio.rb in stdlib and .rb has precedence over .so.
  In fact that extension never worked on TruffleRuby,
  because rb_io_extract_modeenc() has never been defined on TruffleRuby.
* So this just skip compiling the extension since compilation of it now fails:
  https://github.com/ruby/openssl/issues/699

https://github.com/ruby/stringio/commit/d791b63df6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Before this it was compiled but not used, because TruffleRuby has
  a stringio.rb in stdlib and .rb has precedence over .so.
  In fact that extension never worked on TruffleRuby,
  because rb_io_extract_modeenc() has never been defined on TruffleRuby.
* So this just skip compiling the extension since compilation of it now fails:
  https://github.com/ruby/openssl/issues/699

https://github.com/ruby/stringio/commit/d791b63df6
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/stringio] Development of 3.1.0 started.</title>
<updated>2023-11-08T07:04:15+00:00</updated>
<author>
<name>Sutou Kouhei</name>
<email>kou@clear-code.com</email>
</author>
<published>2023-11-08T07:03:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8cd6c65af13ce1ce5ec1b9bd7b8a12cfff52364b'/>
<id>8cd6c65af13ce1ce5ec1b9bd7b8a12cfff52364b</id>
<content type='text'>
https://github.com/ruby/stringio/commit/a2f8ef1a6a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/stringio/commit/a2f8ef1a6a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/stringio] Add missing row separator encoding conversion</title>
<updated>2023-11-08T00:46:17+00:00</updated>
<author>
<name>Sutou Kouhei</name>
<email>kou@clear-code.com</email>
</author>
<published>2023-11-08T00:46:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7ed37388fb9c0e85325b4e3db2ffbfca3f4179ad'/>
<id>7ed37388fb9c0e85325b4e3db2ffbfca3f4179ad</id>
<content type='text'>
(https://github.com/ruby/stringio/pull/69)

The conversion logic is borrowed from ruby/ruby's io.c:
https://github.com/ruby/ruby/blob/40391faeab608665da87a05c686c074f91a5a206/io.c#L4059-L4079

Fix ruby/stringio#68

Reported by IWAMOTO Kouichi. Thanks!!!

https://github.com/ruby/stringio/commit/4b170c1a68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/stringio/pull/69)

The conversion logic is borrowed from ruby/ruby's io.c:
https://github.com/ruby/ruby/blob/40391faeab608665da87a05c686c074f91a5a206/io.c#L4059-L4079

Fix ruby/stringio#68

Reported by IWAMOTO Kouichi. Thanks!!!

https://github.com/ruby/stringio/commit/4b170c1a68
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/stringio] Make STRINGIO_VERSION uniform</title>
<updated>2023-11-04T10:28:49+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-11-04T08:43:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=79d0879536cb28ce2dc5887fc46afdca170fdc76'/>
<id>79d0879536cb28ce2dc5887fc46afdca170fdc76</id>
<content type='text'>
https://github.com/ruby/stringio/commit/4400bf3380
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/stringio/commit/4400bf3380
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/stringio] Move Java version to Java directory</title>
<updated>2023-11-04T10:28:39+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-11-04T04:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b30783e02ea8cfd89b657f85b261d14920448e46'/>
<id>b30783e02ea8cfd89b657f85b261d14920448e46</id>
<content type='text'>
https://github.com/ruby/stringio/commit/3f90a0d619
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/stringio/commit/3f90a0d619
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/stringio] StringIO#pread: handle 0 length like IO#pread</title>
<updated>2023-10-05T07:44:08+00:00</updated>
<author>
<name>Jean byroot Boussier</name>
<email>jean.boussier+github@shopify.com</email>
</author>
<published>2023-10-05T07:43:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f087f2c74c99ec5fed04896d3dc91ff76c2b16b8'/>
<id>f087f2c74c99ec5fed04896d3dc91ff76c2b16b8</id>
<content type='text'>
(https://github.com/ruby/stringio/pull/67)

Fix: https://github.com/ruby/stringio/issues/66

If length is 0, IO#pread don't even try to read the IO, it simply return
the buffer untouched if there is one or a new empty buffer otherwise.

It also doesn't validate the offset when length is 0.

cc @jdelStrother @kou

https://github.com/ruby/stringio/commit/37e9279337

Co-authored-by: Jean Boussier &lt;jean.boussier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/stringio/pull/67)

Fix: https://github.com/ruby/stringio/issues/66

If length is 0, IO#pread don't even try to read the IO, it simply return
the buffer untouched if there is one or a new empty buffer otherwise.

It also doesn't validate the offset when length is 0.

cc @jdelStrother @kou

https://github.com/ruby/stringio/commit/37e9279337

Co-authored-by: Jean Boussier &lt;jean.boussier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/stringio] [DOC] Fix link</title>
<updated>2023-09-22T14:17:07+00:00</updated>
<author>
<name>Burdette Lamar</name>
<email>BurdetteLamar@Yahoo.com</email>
</author>
<published>2023-09-22T14:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=02022cef53895cf72181c70a306f5f54f752f069'/>
<id>02022cef53895cf72181c70a306f5f54f752f069</id>
<content type='text'>
(https://github.com/ruby/stringio/pull/65)

https://github.com/ruby/stringio/commit/e3ea087d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/stringio/pull/65)

https://github.com/ruby/stringio/commit/e3ea087d04
</pre>
</div>
</content>
</entry>
</feed>
