<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/strscan/strscan.c, 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/strscan] Bump version</title>
<updated>2023-11-08T00:26:58+00:00</updated>
<author>
<name>Sutou Kouhei</name>
<email>kou@clear-code.com</email>
</author>
<published>2023-10-11T00:40:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ce8301084f661f8a22b36bc6f7207bf40e8bf61d'/>
<id>ce8301084f661f8a22b36bc6f7207bf40e8bf61d</id>
<content type='text'>
https://github.com/ruby/strscan/commit/1b3393be05
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/strscan/commit/1b3393be05
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/strscan] Fix indentation in strscan.c</title>
<updated>2023-07-28T14:12:52+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-07-28T14:12:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=91e13a520730add19efb7ff05274f54824cb64fc'/>
<id>91e13a520730add19efb7ff05274f54824cb64fc</id>
<content type='text'>
[ci skip]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ci skip]
</pre>
</div>
</content>
</entry>
<entry>
<title>Add function rb_reg_onig_match</title>
<updated>2023-07-27T17:33:40+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-07-26T19:57:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7193b404a1a56e50f8046d0382914907020c1559'/>
<id>7193b404a1a56e50f8046d0382914907020c1559</id>
<content type='text'>
rb_reg_onig_match performs preparation, error handling, and cleanup for
matching a regex against a string. This reduces repetitive code and
removes the need for StringScanner to access internal data of regex.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rb_reg_onig_match performs preparation, error handling, and cleanup for
matching a regex against a string. This reduces repetitive code and
removes the need for StringScanner to access internal data of regex.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/strscan] Sync missed commit</title>
<updated>2023-07-27T13:42:42+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-07-27T13:42:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e27eab2f85f3d16a822b5c239d44d6fb34d72e5f'/>
<id>e27eab2f85f3d16a822b5c239d44d6fb34d72e5f</id>
<content type='text'>
Syncs commit ruby/strscan@76b377a5d875ec77282d9319d62d8f24fe283b40.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Syncs commit ruby/strscan@76b377a5d875ec77282d9319d62d8f24fe283b40.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/strscan] Bump version</title>
<updated>2023-02-21T10:31:36+00:00</updated>
<author>
<name>Sutou Kouhei</name>
<email>kou@clear-code.com</email>
</author>
<published>2023-02-08T00:33:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=18e840ac6084715e1ccd4c84153d213583279691'/>
<id>18e840ac6084715e1ccd4c84153d213583279691</id>
<content type='text'>
https://github.com/ruby/strscan/commit/681cde0f27
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/strscan/commit/681cde0f27
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/strscan] Mention return value of `rest?` in the doc</title>
<updated>2023-02-21T10:31:35+00:00</updated>
<author>
<name>OKURA Masafumi</name>
<email>masafumi.o1988@gmail.com</email>
</author>
<published>2023-01-30T03:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a44f5ab089ca208cdd96fc2c7597f1c17b27c235'/>
<id>a44f5ab089ca208cdd96fc2c7597f1c17b27c235</id>
<content type='text'>
(https://github.com/ruby/strscan/pull/49)

The doc of `rest?` was unclear about return value. This commit adds the
return value to the doc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/strscan/pull/49)

The doc of `rest?` was unclear about return value. This commit adds the
return value to the doc.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/strscan] Bump version</title>
<updated>2022-12-26T06:09:21+00:00</updated>
<author>
<name>Sutou Kouhei</name>
<email>kou@clear-code.com</email>
</author>
<published>2022-12-08T05:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=79ad0452146e6ceacc9387bc78d74a53f6a20767'/>
<id>79ad0452146e6ceacc9387bc78d74a53f6a20767</id>
<content type='text'>
https://github.com/ruby/strscan/commit/3ada12613d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/strscan/commit/3ada12613d
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge strscan-3.0.5</title>
<updated>2022-12-09T07:36:22+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-12-09T04:03:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4e31fea77d360c6535e33ff2525d80fba38d15d8'/>
<id>4e31fea77d360c6535e33ff2525d80fba38d15d8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
