Takashi Kokubun 1df1538be4 merge revision(s) f54369830f83a65fb54916d762883fbe6eeb7d0b, 338eb0065bd81ba8ae8b9402abc94804a24594cc, ac636f5709feb1d9d7a0c46a86be153be765cf21: [Backport #20516]
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') #=> #<StringScanner 0/9 @ "fooba...">
	s.scan /(foo)(bar)(BAZ)?/  #=> "foobar"
	s[0]           #=> "foobar"
	s[1]           #=> "foo"
	s[2]           #=> "bar"
	s[3]           #=> nil
	s.captures #=> ["foo", "bar", ""]
	s.captures.compact #=> ["foo", "bar", ""]
	```

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

	https://docs.ruby-lang.org/ja/latest/method/MatchData/i/captures.html
	```
	/(foo)(bar)(BAZ)?/ =~ "foobarbaz" #=> 0
	$~.to_a        #=> ["foobar", "foo", "bar", nil]
	$~.captures #=> ["foo", "bar", nil]
	$~.captures.compact #=> ["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
2024-06-04 13:14:09 -07:00
..
2023-11-30 08:19:28 +00:00
2023-02-28 09:09:00 -08:00
2023-11-07 04:16:02 +00:00
2023-12-13 05:01:16 +00:00
2023-11-07 06:55:45 +00:00
2023-11-08 09:25:45 +09:00
2023-12-16 13:51:34 +08:00
2023-12-05 15:09:56 +09:00
2023-05-25 09:11:36 +00:00
2023-11-07 07:55:13 +00:00
2023-12-19 11:07:47 +09:00
2023-02-28 09:09:00 -08:00
2023-12-16 13:06:37 +08:00
2023-11-07 05:52:50 +00:00
2024-05-29 11:35:46 -07:00