<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/spec/ruby/language/regexp, 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>Make word prop match join_control to conform to UTS 18</title>
<updated>2025-08-27T22:17:15+00:00</updated>
<author>
<name>Janosch Müller</name>
<email>janosch84@gmail.com</email>
</author>
<published>2023-04-13T18:43:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5a42d267bfabc86f86cae2e83de24b1b86bc316a'/>
<id>5a42d267bfabc86f86cae2e83de24b1b86bc316a</id>
<content type='text'>
See &lt;https://bugs.ruby-lang.org/issues/19417#note-3&gt;.

https://unicode.org/reports/tr18/#word states word should match join_control chars.

It did not previously:

```ruby
[*0x0..0xD799, *0xE000..0x10FFFF].map { |n| n.chr 'utf-8' } =&gt; all_chars
all_chars.grep(/\p{join_control}/) =&gt; jc
jc.count # =&gt; 2
jc.grep(/\p{word}/).count # =&gt; 0
```
[Backport #19417]

---

Backporting note: I regenerated `enc/unicode/15.0.0/name2ctype.h` using
`make update-unicode`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See &lt;https://bugs.ruby-lang.org/issues/19417#note-3&gt;.

https://unicode.org/reports/tr18/#word states word should match join_control chars.

It did not previously:

```ruby
[*0x0..0xD799, *0xE000..0x10FFFF].map { |n| n.chr 'utf-8' } =&gt; all_chars
all_chars.grep(/\p{join_control}/) =&gt; jc
jc.count # =&gt; 2
jc.grep(/\p{word}/).count # =&gt; 0
```
[Backport #19417]

---

Backporting note: I regenerated `enc/unicode/15.0.0/name2ctype.h` using
`make update-unicode`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@6b04c1d</title>
<updated>2024-05-19T03:08:05+00:00</updated>
<author>
<name>Andrew Konchin</name>
<email>andry.konchin@gmail.com</email>
</author>
<published>2024-05-09T17:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ad636033e2fdafb417873a3cb8667351033307b1'/>
<id>ad636033e2fdafb417873a3cb8667351033307b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@89175b2</title>
<updated>2024-03-14T20:44:53+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2024-03-14T20:44:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ed2f68525302413a676d81821b949a21d46407e9'/>
<id>ed2f68525302413a676d81821b949a21d46407e9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@30e1c35</title>
<updated>2023-06-26T13:55:11+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2023-06-26T13:55:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=515bd4214497b3af02f6eef51b496ad9a0cf6b3b'/>
<id>515bd4214497b3af02f6eef51b496ad9a0cf6b3b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@e7dc804</title>
<updated>2023-02-27T20:02:44+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2023-02-27T20:02:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=18b4def471bb901d0baa4a1307185484cb05815f'/>
<id>18b4def471bb901d0baa4a1307185484cb05815f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@9d69b95</title>
<updated>2023-01-05T18:05:29+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2023-01-05T18:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bbf54ec334fe2edd7669a944d88d17efde49a412'/>
<id>bbf54ec334fe2edd7669a944d88d17efde49a412</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@cbfaf51</title>
<updated>2022-07-27T15:18:25+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2022-07-27T15:18:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6582df26dcdef5dab01242b4d97d9b242e959860'/>
<id>6582df26dcdef5dab01242b4d97d9b242e959860</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@7f22a0b</title>
<updated>2021-11-29T14:50:28+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2021-11-29T14:50:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=67a1e2258974df4b597d019739595c18fbb9a7c1'/>
<id>67a1e2258974df4b597d019739595c18fbb9a7c1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update to ruby/spec@b1e93a2</title>
<updated>2021-09-07T17:01:07+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2021-09-07T17:01:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=258661409e9e3fd470f006975ded872778aad4f4'/>
<id>258661409e9e3fd470f006975ded872778aad4f4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix handling of control/meta escapes in literal regexps</title>
<updated>2021-05-13T01:55:43+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-05-12T19:37:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=11ae581a4a7f5d5f5ec6378872eab8f25381b1b9'/>
<id>11ae581a4a7f5d5f5ec6378872eab8f25381b1b9</id>
<content type='text'>
Ruby uses a recursive algorithm for handling control/meta escapes
in strings (read_escape).  However, the equivalent code for regexps
(tokadd_escape) in did not use a recursive algorithm.  Due to this,
Handling of control/meta escapes in regexp did not have the same
behavior as in strings, leading to behavior such as the following
returning nil:

```ruby
/\c\xFF/ =~ "\c\xFF"
```

Switch the code for handling \c, \C and \M in literal regexps to
use the same code as for strings (read_escape), to keep behavior
consistent between the two.

Fixes [Bug #14367]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ruby uses a recursive algorithm for handling control/meta escapes
in strings (read_escape).  However, the equivalent code for regexps
(tokadd_escape) in did not use a recursive algorithm.  Due to this,
Handling of control/meta escapes in regexp did not have the same
behavior as in strings, leading to behavior such as the following
returning nil:

```ruby
/\c\xFF/ =~ "\c\xFF"
```

Switch the code for handling \c, \C and \M in literal regexps to
use the same code as for strings (read_escape), to keep behavior
consistent between the two.

Fixes [Bug #14367]
</pre>
</div>
</content>
</entry>
</feed>
