<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby.git/string.c, branch ruby_3_2</title>
<subtitle>github.com: ruby/ruby.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/'/>
<entry>
<title>merge revision(s) d78ae78fd76e556e281a743c75bea4c0bb81ed8c: [Backport #19468]</title>
<updated>2023-03-17T01:56:18+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-03-17T01:56:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=b309c246ee70926d593d3857e1625202e2d0f67b'/>
<id>b309c246ee70926d593d3857e1625202e2d0f67b</id>
<content type='text'>
	rb_str_modify_expand: clear the string coderange

	[Bug #19468]

	b0b9f7201acab05c2a3ad92c3043a1f01df3e17f errornously stopped
	clearing the coderange.

	Since `rb_str_modify` clears it, `rb_str_modify_expand`
	should too.
	---
	 string.c | 1 +
	 1 file changed, 1 insertion(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	rb_str_modify_expand: clear the string coderange

	[Bug #19468]

	b0b9f7201acab05c2a3ad92c3043a1f01df3e17f errornously stopped
	clearing the coderange.

	Since `rb_str_modify` clears it, `rb_str_modify_expand`
	should too.
	---
	 string.c | 1 +
	 1 file changed, 1 insertion(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 9726736006b3f74635fd8af05814fe0908e2cf84: [Backport #19327]</title>
<updated>2023-01-31T14:46:50+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-01-31T14:46:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=40e0b1e123503805c16a2a9aafae0a5c302c20d1'/>
<id>40e0b1e123503805c16a2a9aafae0a5c302c20d1</id>
<content type='text'>
	Set STR_SHARED_ROOT flag on root of string

	---
	 string.c | 1 +
	 1 file changed, 1 insertion(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Set STR_SHARED_ROOT flag on root of string

	---
	 string.c | 1 +
	 1 file changed, 1 insertion(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) f7b72462aa27716370c6bea1f2c240983aca9a55: [Backport #19356]</title>
<updated>2023-01-20T03:24:24+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-01-20T03:24:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=373e62248c9dceb660e95f1cf05fa2a4a469cd64'/>
<id>373e62248c9dceb660e95f1cf05fa2a4a469cd64</id>
<content type='text'>
	String#bytesplice should return self

	In Feature #19314, we concluded that the return value of String#bytesplice
	should be changed from the source string to the receiver, because the source
	string is useless and confusing when extra arguments are added.

	This change should be included in Ruby 3.2.1.
	---
	 string.c                 | 4 ++--
	 test/ruby/test_string.rb | 2 +-
	 2 files changed, 3 insertions(+), 3 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	String#bytesplice should return self

	In Feature #19314, we concluded that the return value of String#bytesplice
	should be changed from the source string to the receiver, because the source
	string is useless and confusing when extra arguments are added.

	This change should be included in Ruby 3.2.1.
	---
	 string.c                 | 4 ++--
	 test/ruby/test_string.rb | 2 +-
	 2 files changed, 3 insertions(+), 3 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 3be2acfafd3b3c6168e2266c7c6561d143d7ae5c: [Backport #19327]</title>
<updated>2023-01-19T12:52:47+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-01-19T12:52:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=6a8fcb50210f8414d76968298576e39b9fa82562'/>
<id>6a8fcb50210f8414d76968298576e39b9fa82562</id>
<content type='text'>
	Fix re-embedding of strings during compaction

	The reference updating code for strings is not re-embedding strings
	because the code is incorrectly wrapped inside of a
	`if (STR_SHARED_P(obj))` clause. Shared strings can't be re-embedded
	so this ends up being a no-op. This means that strings can be moved to a
	large size pool during compaction, but won't be re-embedded, which would
	waste the space.
	---
	 gc.c                         | 16 +++++++++-------
	 string.c                     | 12 ++++++++----
	 test/ruby/test_gc_compact.rb |  8 ++++----
	 3 files changed, 21 insertions(+), 15 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix re-embedding of strings during compaction

	The reference updating code for strings is not re-embedding strings
	because the code is incorrectly wrapped inside of a
	`if (STR_SHARED_P(obj))` clause. Shared strings can't be re-embedded
	so this ends up being a no-op. This means that strings can be moved to a
	large size pool during compaction, but won't be re-embedded, which would
	waste the space.
	---
	 gc.c                         | 16 +++++++++-------
	 string.c                     | 12 ++++++++----
	 test/ruby/test_gc_compact.rb |  8 ++++----
	 3 files changed, 21 insertions(+), 15 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) d8ef0a98c670449b20436947f5ebbd327ed5ab0d: [Backport #19319]</title>
<updated>2023-01-19T02:59:43+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2023-01-19T02:59:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=686b38f83e70b3e1796092c71dd0b7dc2206b118'/>
<id>686b38f83e70b3e1796092c71dd0b7dc2206b118</id>
<content type='text'>
	[Bug #19319] Fix crash in rb_str_casemap

	The following code crashes on my machine:

	```
	GC.stress = true

	str = "testing testing testing"

	puts str.capitalize
	```

	We need to ensure that the object `buffer_anchor` remains on the stack
	so it does not get GC'd.
	---
	 string.c | 2 ++
	 1 file changed, 2 insertions(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #19319] Fix crash in rb_str_casemap

	The following code crashes on my machine:

	```
	GC.stress = true

	str = "testing testing testing"

	puts str.capitalize
	```

	We need to ensure that the object `buffer_anchor` remains on the stack
	so it does not get GC'd.
	---
	 string.c | 2 ++
	 1 file changed, 2 insertions(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix typo</title>
<updated>2022-12-21T15:01:18+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-12-21T14:59:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=98fbebf110f0802fd6c72e48eb9d9a6c40878e40'/>
<id>98fbebf110f0802fd6c72e48eb9d9a6c40878e40</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce encoding check macro</title>
<updated>2022-12-01T16:31:27+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2022-11-15T04:21:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=1a64d45c67feed7355d6b53746801acb319394a4'/>
<id>1a64d45c67feed7355d6b53746801acb319394a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make String#rstrip{,!} raise Encoding::CompatibilityError for broken coderange</title>
<updated>2022-11-25T02:24:42+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2022-08-24T17:31:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=571d21fd4a2e877f49b4ff918832bda9a5e8f91c'/>
<id>571d21fd4a2e877f49b4ff918832bda9a5e8f91c</id>
<content type='text'>
It's questionable whether we want to allow rstrip to work for strings
where the broken coderange occurs before the trailing whitespace and
not after, but this approach is probably simpler, and I don't think
users should expect string operations like rstrip to work on broken
strings.

In some cases, this changes rstrip to raise
Encoding::CompatibilityError instead of ArgumentError.  However, as
the problem is related to an encoding issue in the receiver, and due
not due to an issue with an argument, I think
Encoding::CompatibilityError is the more appropriate error.

Fixes [Bug #18931]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's questionable whether we want to allow rstrip to work for strings
where the broken coderange occurs before the trailing whitespace and
not after, but this approach is probably simpler, and I don't think
users should expect string operations like rstrip to work on broken
strings.

In some cases, this changes rstrip to raise
Encoding::CompatibilityError instead of ArgumentError.  However, as
the problem is related to an encoding issue in the receiver, and due
not due to an issue with an argument, I think
Encoding::CompatibilityError is the more appropriate error.

Fixes [Bug #18931]
</pre>
</div>
</content>
</entry>
<entry>
<title>Using UNDEF_P macro</title>
<updated>2022-11-16T09:58:33+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2022-11-15T04:24:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6'/>
<id>1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite Symbol#to_sym and #intern in Ruby (#6683)</title>
<updated>2022-11-16T05:34:30+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-16T05:34:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=e7443dbbcaf82eee200d33a5c3bc374ad9eec8a7'/>
<id>e7443dbbcaf82eee200d33a5c3bc374ad9eec8a7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
