<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby.git/test/ruby/test_string.rb, 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) 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>Prevent segfault in String#scan with ObjectSpace.each_object</title>
<updated>2022-11-30T17:38:51+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2022-11-30T16:31:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=ab4c7077cc44cd6725625562b7380a44cf462190'/>
<id>ab4c7077cc44cd6725625562b7380a44cf462190</id>
<content type='text'>
Calling `String#scan` without a block creates an incomplete MatchData
object whose `RMATCH(match)-&gt;str` is Qfalse. Usually this object is not
leaked, but it was possible to pull it by using ObjectSpace.each_object.

This change hides the internal MatchData object by using rb_obj_hide.

Fixes [Bug #19159]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calling `String#scan` without a block creates an incomplete MatchData
object whose `RMATCH(match)-&gt;str` is Qfalse. Usually this object is not
leaked, but it was possible to pull it by using ObjectSpace.each_object.

This change hides the internal MatchData object by using rb_obj_hide.

Fixes [Bug #19159]
</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>Transition frozen string to frozen root shape</title>
<updated>2022-10-19T18:06:19+00:00</updated>
<author>
<name>Jemma Issroff</name>
<email>jemmaissroff@gmail.com</email>
</author>
<published>2022-10-19T13:30:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=0aaa6133ed7365e5037ccdac8b59b00fb13aa50e'/>
<id>0aaa6133ed7365e5037ccdac8b59b00fb13aa50e</id>
<content type='text'>
Co-Authored-By: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix inspect for unicode codepoint 0x85</title>
<updated>2022-08-11T15:47:29+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-02-26T20:14:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=49517b3bb436456407e0ee099c7442f3ab5ac53d'/>
<id>49517b3bb436456407e0ee099c7442f3ab5ac53d</id>
<content type='text'>
This is an inelegant hack, by manually checking for this specific
code point in rb_str_inspect.  Some testing indicates that this is
the only code point affected.

It's possible a better fix would be inside of lower-level encoding
code, such that rb_enc_isprint would return false and not true for
codepoint 0x85.

Fixes [Bug #16842]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an inelegant hack, by manually checking for this specific
code point in rb_str_inspect.  Some testing indicates that this is
the only code point affected.

It's possible a better fix would be inside of lower-level encoding
code, such that rb_enc_isprint would return false and not true for
codepoint 0x85.

Fixes [Bug #16842]
</pre>
</div>
</content>
</entry>
<entry>
<title>Make String#each_line work correctly with paragraph separator and chomp</title>
<updated>2022-07-21T15:02:32+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2022-05-26T20:25:22+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=423b41cba77719b4f62aa530593ad36a990f7c74'/>
<id>423b41cba77719b4f62aa530593ad36a990f7c74</id>
<content type='text'>
Previously, it was including one newline when chomp was used,
which is inconsistent with IO#each_line behavior. This makes
behavior consistent with IO#each_line, chomping all paragraph
separators (multiple consecutive newlines), but not single
newlines.

Partially Fixes [Bug #18768]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, it was including one newline when chomp was used,
which is inconsistent with IO#each_line behavior. This makes
behavior consistent with IO#each_line, chomping all paragraph
separators (multiple consecutive newlines), but not single
newlines.

Partially Fixes [Bug #18768]
</pre>
</div>
</content>
</entry>
<entry>
<title>Add String#bytesplice</title>
<updated>2022-03-18T02:51:03+00:00</updated>
<author>
<name>Shugo Maeda</name>
<email>shugo@ruby-lang.org</email>
</author>
<published>2022-02-22T01:41:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=1107839a7fed31339fc947995b7b45b8eaf4041b'/>
<id>1107839a7fed31339fc947995b7b45b8eaf4041b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add some tests for Unicode Version 14.0.0</title>
<updated>2022-03-13T00:19:52+00:00</updated>
<author>
<name>Martin Dürst</name>
<email>duerst@it.aoyama.ac.jp</email>
</author>
<published>2022-03-12T12:33:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=8f59482f5d1f77542fe3c8e8434cb1dbbc764ecf'/>
<id>8f59482f5d1f77542fe3c8e8434cb1dbbc764ecf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add String#byteindex, String#byterindex, and MatchData#byteoffset (#5518)</title>
<updated>2022-02-19T10:10:00+00:00</updated>
<author>
<name>Shugo Maeda</name>
<email>shugo@ruby-lang.org</email>
</author>
<published>2022-02-19T10:10:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=c8817d6a3ebc9bbc151625bca198b8f327d1d68f'/>
<id>c8817d6a3ebc9bbc151625bca198b8f327d1d68f</id>
<content type='text'>
* Add String#byteindex, String#byterindex, and MatchData#byteoffset [Feature #13110]

Co-authored-by: NARUSE, Yui &lt;naruse@airemix.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add String#byteindex, String#byterindex, and MatchData#byteoffset [Feature #13110]

Co-authored-by: NARUSE, Yui &lt;naruse@airemix.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not run the same tests twice</title>
<updated>2022-01-08T05:47:59+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-01-07T15:36:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby.git/commit/?id=47a05f7c097aa760d523abbc40e724b4ce2408d1'/>
<id>47a05f7c097aa760d523abbc40e724b4ce2408d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
