<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_regexp.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 partially d292a9b98ce03c76dbe13138d20b9fbf613cc02d. Just add the test to ensure the issue doesn't exit in ruby_3_2 branch.</title>
<updated>2024-07-15T09:03:08+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-15T09:03:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c22398f96c29c2357bee50b291c358cc34837013'/>
<id>c22398f96c29c2357bee50b291c358cc34837013</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) a8ba1ddd78544b4bda749051d44f7b2a8a0ec5ff: [Backport #19455]</title>
<updated>2023-07-17T08:23:31+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-07-17T08:23:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=be09d77b966c7bcc77957927f16cefe66b365495'/>
<id>be09d77b966c7bcc77957927f16cefe66b365495</id>
<content type='text'>
	Use UTF-8 encoding for literal extended regexps with UTF-8 characters
	 in comments

	Fixes [Bug #19455]
	---
	 re.c                     | 9 ++++++++-
	 test/ruby/test_regexp.rb | 7 +++++++
	 2 files changed, 15 insertions(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Use UTF-8 encoding for literal extended regexps with UTF-8 characters
	 in comments

	Fixes [Bug #19455]
	---
	 re.c                     | 9 ++++++++-
	 test/ruby/test_regexp.rb | 7 +++++++
	 2 files changed, 15 insertions(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 0ac3f2c20e50c22d298238f602f25f84248ac7a5: [Backport #19587]</title>
<updated>2023-07-17T05:20:00+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-07-17T05:20:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a7b0d3c9db9afeccf6e0962bb1cdcbea5bf04cae'/>
<id>a7b0d3c9db9afeccf6e0962bb1cdcbea5bf04cae</id>
<content type='text'>
	[Bug #19587] Fix `reset_match_cache` arguments

	---
	 regexec.c                | 2 +-
	 test/ruby/test_regexp.rb | 8 ++++++++
	 2 files changed, 9 insertions(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19587] Fix `reset_match_cache` arguments

	---
	 regexec.c                | 2 +-
	 test/ruby/test_regexp.rb | 8 ++++++++
	 2 files changed, 9 insertions(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 680bd9027f8cb7977bbc216609db2f4e3cf199a8: [Backport #19471]</title>
<updated>2023-03-28T05:25:13+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-03-28T05:25:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fb4ffce0dd8cae3b7d0141d3b1ea3f0ab710a45a'/>
<id>fb4ffce0dd8cae3b7d0141d3b1ea3f0ab710a45a</id>
<content type='text'>
	[Bug #19471] `Regexp.compile` should handle keyword arguments

	As well as `Regexp.new`, it should pass keyword arguments to the
	`Regexp#initialize` method.
	---
	 re.c                     | 2 +-
	 test/ruby/test_regexp.rb | 5 +++++
	 2 files changed, 6 insertions(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19471] `Regexp.compile` should handle keyword arguments

	As well as `Regexp.new`, it should pass keyword arguments to the
	`Regexp#initialize` method.
	---
	 re.c                     | 2 +-
	 test/ruby/test_regexp.rb | 5 +++++
	 2 files changed, 6 insertions(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) dddc542e9b61b292d80a96d0d0efbbf58719e3be: [Backport #19476]</title>
<updated>2023-03-22T01:34:12+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-03-22T01:34:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ad6fe84dfa6935bd6e2c3ef3ee36bed4e8627d0b'/>
<id>ad6fe84dfa6935bd6e2c3ef3ee36bed4e8627d0b</id>
<content type='text'>
	[Bug #19476]: correct cache index computation for repetition (#7457)

	---
	 regexec.c                | 4 ++--
	 test/ruby/test_regexp.rb | 5 +++++
	 2 files changed, 7 insertions(+), 2 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19476]: correct cache index computation for repetition (#7457)

	---
	 regexec.c                | 4 ++--
	 test/ruby/test_regexp.rb | 5 +++++
	 2 files changed, 7 insertions(+), 2 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) e22c4e8877677ff90805e4a4dcbdef80f4220136: [Backport #19467]</title>
<updated>2023-03-20T06:06:34+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-03-20T06:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4b4087dce318570f9f9c05e14900325b499fb632'/>
<id>4b4087dce318570f9f9c05e14900325b499fb632</id>
<content type='text'>
	[Bug #19467] correct cache points and counting failure on
	 `OP_ANYCHAR_STAR_PEEK_NEXT` (#7454)

	---
	 regexec.c                | 20 ++++++++++++++++----
	 test/ruby/test_regexp.rb | 10 ++++++++++
	 2 files changed, 26 insertions(+), 4 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19467] correct cache points and counting failure on
	 `OP_ANYCHAR_STAR_PEEK_NEXT` (#7454)

	---
	 regexec.c                | 20 ++++++++++++++++----
	 test/ruby/test_regexp.rb | 10 ++++++++++
	 2 files changed, 26 insertions(+), 4 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) eccfc978fd6f65332eb70c9a46fbb4d5110bbe0a: [Backport #19379]</title>
<updated>2023-01-31T06:28:01+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-01-31T06:28:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ca75332f46c39804e06cd37c2608cbdef0aebf05'/>
<id>ca75332f46c39804e06cd37c2608cbdef0aebf05</id>
<content type='text'>
	Fix parsing of regexps that toggle extended mode on/off inside regexp

	This was broken in ec3542229b29ec93062e9d90e877ea29d3c19472. That commit
	didn't handle cases where extended mode was turned on/off inside the
	regexp.  There are two ways to turn extended mode on/off:

	```
	/(?-x:#y)#z
	/x =~ '#y'

	/(?-x)#y(?x)#z
	/x =~ '#y'
	```

	These can be nested inside the same regexp:

	```
	/(?-x:(?x)#x
	(?-x)#y)#z
	/x =~ '#y'
	```

	As you can probably imagine, this makes handling these regexps
	somewhat complex. Due to the nesting inside portions of regexps,
	the unassign_nonascii function needs to be recursive.  In
	recursive mode, it needs to track both opening and closing
	parentheses, similar to how it already tracked opening and
	closing brackets for character classes.

	When scanning the regexp and coming to `(?` not followed by `#`,
	scan for options, and use `x` and `i` to determine whether to
	turn on or off extended mode.  For `:`, indicting only the
	current regexp section should have the extended mode
	switched, recurse with the extended mode set or unset. For `)`,
	indicating the remainder of the regexp (or current regexp portion
	if already recursing) should turn extended mode on or off, just
	change the extended mode flag and keep scanning.

	While testing this, I noticed that `a`, `d`, and `u` are accepted
	as options, in addition to `i`, `m`, and `x`, but I can't see
	where those options are documented.  I'm not sure whether or not
	handling  `a`, `d`, and `u` as options is a bug.

	Fixes [Bug #19379]
	---
	 re.c                     | 153 +++++++++++++++++++++++++++++++++++++----------
	 test/ruby/test_regexp.rb |  56 +++++++++++++++++
	 2 files changed, 176 insertions(+), 33 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix parsing of regexps that toggle extended mode on/off inside regexp

	This was broken in ec3542229b29ec93062e9d90e877ea29d3c19472. That commit
	didn't handle cases where extended mode was turned on/off inside the
	regexp.  There are two ways to turn extended mode on/off:

	```
	/(?-x:#y)#z
	/x =~ '#y'

	/(?-x)#y(?x)#z
	/x =~ '#y'
	```

	These can be nested inside the same regexp:

	```
	/(?-x:(?x)#x
	(?-x)#y)#z
	/x =~ '#y'
	```

	As you can probably imagine, this makes handling these regexps
	somewhat complex. Due to the nesting inside portions of regexps,
	the unassign_nonascii function needs to be recursive.  In
	recursive mode, it needs to track both opening and closing
	parentheses, similar to how it already tracked opening and
	closing brackets for character classes.

	When scanning the regexp and coming to `(?` not followed by `#`,
	scan for options, and use `x` and `i` to determine whether to
	turn on or off extended mode.  For `:`, indicting only the
	current regexp section should have the extended mode
	switched, recurse with the extended mode set or unset. For `)`,
	indicating the remainder of the regexp (or current regexp portion
	if already recursing) should turn extended mode on or off, just
	change the extended mode flag and keep scanning.

	While testing this, I noticed that `a`, `d`, and `u` are accepted
	as options, in addition to `i`, `m`, and `x`, but I can't see
	where those options are documented.  I'm not sure whether or not
	handling  `a`, `d`, and `u` as options is a bug.

	Fixes [Bug #19379]
	---
	 re.c                     | 153 +++++++++++++++++++++++++++++++++++++----------
	 test/ruby/test_regexp.rb |  56 +++++++++++++++++
	 2 files changed, 176 insertions(+), 33 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) b726d60c986bf951d13e7a2ab5f5e58f58657b03: [Backport #19273]</title>
<updated>2022-12-29T06:59:52+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2022-12-29T06:59:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a7d467a792c644a7260d6560ea2002fdb8ff6de3'/>
<id>a7d467a792c644a7260d6560ea2002fdb8ff6de3</id>
<content type='text'>
	Fix [Bug 19273], set correct value to `outer_repeat` on `OP_REPEAT`
	 (#7035)

	---
	 regexec.c                | 2 +-
	 test/ruby/test_regexp.rb | 5 +++++
	 2 files changed, 6 insertions(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix [Bug 19273], set correct value to `outer_repeat` on `OP_REPEAT`
	 (#7035)

	---
	 regexec.c                | 2 +-
	 test/ruby/test_regexp.rb | 5 +++++
	 2 files changed, 6 insertions(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>Always issue deprecation warning when calling Regexp.new with 3rd positional argument</title>
<updated>2022-12-22T19:50:26+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2022-12-20T20:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7e8fa06022a9e412e3f8e6c8b6f0ba1909f648d5'/>
<id>7e8fa06022a9e412e3f8e6c8b6f0ba1909f648d5</id>
<content type='text'>
Previously, only certain values of the 3rd argument triggered a
deprecation warning.

First step for fix for bug #18797.  Support for the 3rd argument
will be removed after the release of Ruby 3.2.

Fix minor fallout discovered by the tests.

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, only certain values of the 3rd argument triggered a
deprecation warning.

First step for fix for bug #18797.  Support for the 3rd argument
will be removed after the release of Ruby 3.2.

Fix minor fallout discovered by the tests.

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Share argument parsing in `Regexp#initialize` and `Regexp.linear_time?`</title>
<updated>2022-12-22T06:51:00+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-12-21T14:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=454c00723a24916daeedde993a8429ab508576d3'/>
<id>454c00723a24916daeedde993a8429ab508576d3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
