<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/-test-, branch ruby_3_0</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 5680c38c75aeb5cbd219aafa8eb48c315f287d97,f5d20411386ff2552ff27661387ddc4bae1ebc30: [Backport #17573]</title>
<updated>2021-11-23T05:52:30+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2021-11-23T05:26:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=949af69408e44b69cc7437b58e8edbe3cd77c966'/>
<id>949af69408e44b69cc7437b58e8edbe3cd77c966</id>
<content type='text'>
	Use valid `ec` for postponed job.

	Postponed job can be registered from non-Ruby thread, which means
	`ec` in TLS can be NULL. In this case, use main thread's `ec` instead.

	See https://github.com/ruby/ruby/pull/4108
	and https://github.com/ruby/ruby/pull/4336
	---
	 vm_trace.c | 16 ++++++++++++----
	 1 file changed, 12 insertions(+), 4 deletions(-)

	Avoid assert failure when NULL EC is expected

	After 5680c38c75aeb5cbd219aafa8eb48c315f287d97, postponed job APIs now
	expect to be called on native threads not managed by Ruby and handles
	getting a NULL execution context. However, in debug builds the change
	runs into an assertion failure with GET_EC() which asserts that EC is
	non-NULL. Avoid the assertion failure by passing `false` for `expect_ec`
	instead as the intention is to handle when there is no EC.

	Add a test from John Crepezzi and John Hawthorn to exercise this
	situation.

	See GH-4108
	See GH-5094

	[Bug #17573]

	Co-authored-by: John Hawthorn &lt;john@hawthorn.email&gt;
	Co-authored-by: John Crepezzi &lt;john.crepezzi@gmail.com&gt;
	---
	 ext/-test-/postponed_job/postponed_job.c       | 31 ++++++++++++++++++++++++++
	 test/-ext-/postponed_job/test_postponed_job.rb |  7 ++++++
	 vm_trace.c                                     |  2 +-
	 3 files changed, 39 insertions(+), 1 deletion(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Use valid `ec` for postponed job.

	Postponed job can be registered from non-Ruby thread, which means
	`ec` in TLS can be NULL. In this case, use main thread's `ec` instead.

	See https://github.com/ruby/ruby/pull/4108
	and https://github.com/ruby/ruby/pull/4336
	---
	 vm_trace.c | 16 ++++++++++++----
	 1 file changed, 12 insertions(+), 4 deletions(-)

	Avoid assert failure when NULL EC is expected

	After 5680c38c75aeb5cbd219aafa8eb48c315f287d97, postponed job APIs now
	expect to be called on native threads not managed by Ruby and handles
	getting a NULL execution context. However, in debug builds the change
	runs into an assertion failure with GET_EC() which asserts that EC is
	non-NULL. Avoid the assertion failure by passing `false` for `expect_ec`
	instead as the intention is to handle when there is no EC.

	Add a test from John Crepezzi and John Hawthorn to exercise this
	situation.

	See GH-4108
	See GH-5094

	[Bug #17573]

	Co-authored-by: John Hawthorn &lt;john@hawthorn.email&gt;
	Co-authored-by: John Crepezzi &lt;john.crepezzi@gmail.com&gt;
	---
	 ext/-test-/postponed_job/postponed_job.c       | 31 ++++++++++++++++++++++++++
	 test/-ext-/postponed_job/test_postponed_job.rb |  7 ++++++
	 vm_trace.c                                     |  2 +-
	 3 files changed, 39 insertions(+), 1 deletion(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>add dependency for ext/-test-/array/concat/to_ary_conact.c</title>
<updated>2021-09-05T04:49:07+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2021-09-05T04:49:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=911e75f0547ae3496280a731fbfd986096b0ffb6'/>
<id>911e75f0547ae3496280a731fbfd986096b0ffb6</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) cd4f5b13228879d954fa97b6aa479c4a5ef4fb0a,8db269edb3550a85dfab9b193ea115ca36912ced,ab63f6d8543903f177c46634f38e5428655f003b: [Backport #18140]</title>
<updated>2021-09-05T03:19:53+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2021-09-05T03:19:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=92846db6861eed324288819157e6c7722fc62fc2'/>
<id>92846db6861eed324288819157e6c7722fc62fc2</id>
<content type='text'>
	Guard array when appending

	This prevents early collection of the array.  The GC doesn't see the
	array on the stack when Ruby is compiled with optimizations enabled

	[ruby-core:105099] [Bug #18140]
	---
	 array.c                 | 1 +
	 test/ruby/test_array.rb | 6 ++++++
	 2 files changed, 7 insertions(+)

	Guard array when appending

	This prevents early collection of the array.  The GC doesn't see the
	array on the stack when Ruby is compiled with optimizations enabled

	Thanks @jhaberman for the test case

	[ruby-core:105099] [Bug #18140]
	---
	 ext/-test-/array/concat/depend          | 321 ++++++++++++++++++++++++++++++++
	 ext/-test-/array/concat/extconf.rb      |   2 +
	 ext/-test-/array/concat/to_ary_conact.c |  64 +++++++
	 test/-ext-/array/test_to_ary_concat.rb  |  20 ++
	 4 files changed, 407 insertions(+)
	 create mode 100644 ext/-test-/array/concat/depend
	 create mode 100644 ext/-test-/array/concat/extconf.rb
	 create mode 100644 ext/-test-/array/concat/to_ary_conact.c
	 create mode 100644 test/-ext-/array/test_to_ary_concat.rb

	Refined test [Bug #18140]

	---
	 ext/-test-/array/concat/to_ary_conact.c | 48 +++++++--------------------------
	 test/ruby/test_array.rb                 |  5 +++-
	 2 files changed, 13 insertions(+), 40 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Guard array when appending

	This prevents early collection of the array.  The GC doesn't see the
	array on the stack when Ruby is compiled with optimizations enabled

	[ruby-core:105099] [Bug #18140]
	---
	 array.c                 | 1 +
	 test/ruby/test_array.rb | 6 ++++++
	 2 files changed, 7 insertions(+)

	Guard array when appending

	This prevents early collection of the array.  The GC doesn't see the
	array on the stack when Ruby is compiled with optimizations enabled

	Thanks @jhaberman for the test case

	[ruby-core:105099] [Bug #18140]
	---
	 ext/-test-/array/concat/depend          | 321 ++++++++++++++++++++++++++++++++
	 ext/-test-/array/concat/extconf.rb      |   2 +
	 ext/-test-/array/concat/to_ary_conact.c |  64 +++++++
	 test/-ext-/array/test_to_ary_concat.rb  |  20 ++
	 4 files changed, 407 insertions(+)
	 create mode 100644 ext/-test-/array/concat/depend
	 create mode 100644 ext/-test-/array/concat/extconf.rb
	 create mode 100644 ext/-test-/array/concat/to_ary_conact.c
	 create mode 100644 test/-ext-/array/test_to_ary_concat.rb

	Refined test [Bug #18140]

	---
	 ext/-test-/array/concat/to_ary_conact.c | 48 +++++++--------------------------
	 test/ruby/test_array.rb                 |  5 +++-
	 2 files changed, 13 insertions(+), 40 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 391abc543cea118a9cd7d6310acadbfa352668ef,e86c1f6fc53433ef5c82ed2b7a4cc9a12c153e4c,f6539202c52a051a4e6946a318a1d9cd29002990: [Backport #12052]</title>
<updated>2021-07-18T02:19:13+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2021-07-18T02:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b93a2d9d2cac5d3efe72537debedb089d447d33a'/>
<id>b93a2d9d2cac5d3efe72537debedb089d447d33a</id>
<content type='text'>
	Scan the coderange in the given encoding

	---
	 ext/-test-/string/enc_str_buf_cat.c       | 14 ++++++++++++++
	 string.c                                  | 32 ++++++++++++++++++++++---------
	 test/-ext-/string/test_enc_str_buf_cat.rb |  9 +++++++++
	 3 files changed, 46 insertions(+), 9 deletions(-)

	Work around issue transcoding issue with non-ASCII compatible
	 encodings and xml escaping

	When using a non-ASCII compatible source and destination encoding
	and xml escaping (the :xml option to String#encode), the resulting
	string was broken, as it used the correct non-ASCII compatible
	encoding, but contained data that was ASCII-compatible instead of
	compatible with the string's encoding.

	Work around this issue by detecting the case where both the
	source and destination encoding are non-ASCII compatible, and
	transcoding the source string from the non-ASCII compatible
	encoding to UTF-8. The xml escaping code will correctly handle
	the UTF-8 source string and the return the correctly encoded
	and escaped value.

	Fixes [Bug #12052]

	Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
	---
	 test/ruby/test_transcode.rb | 19 +++++++++++++++++++
	 transcode.c                 |  6 ++++++
	 2 files changed, 25 insertions(+)

	=?UTF-8?q?-=20add=20regression=20tests=20for=20U+6E7F=20(?=
	 =?UTF-8?q?=E6=B9=BF)=20in=20ISO-2022-JP?=
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	  In ISO-2022-JP, the bytes use to code are the same as those for "&lt;&gt;".
	  This adds regression tests to make sure that these bytes, when representing
	  湿, are NOT　escaped with encode("ISO-2022-JP, xml: :text) or similar.
	  These are additional regression tests for #12052.
	---
	 test/ruby/test_transcode.rb | 3 +++
	 1 file changed, 3 insertions(+)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Scan the coderange in the given encoding

	---
	 ext/-test-/string/enc_str_buf_cat.c       | 14 ++++++++++++++
	 string.c                                  | 32 ++++++++++++++++++++++---------
	 test/-ext-/string/test_enc_str_buf_cat.rb |  9 +++++++++
	 3 files changed, 46 insertions(+), 9 deletions(-)

	Work around issue transcoding issue with non-ASCII compatible
	 encodings and xml escaping

	When using a non-ASCII compatible source and destination encoding
	and xml escaping (the :xml option to String#encode), the resulting
	string was broken, as it used the correct non-ASCII compatible
	encoding, but contained data that was ASCII-compatible instead of
	compatible with the string's encoding.

	Work around this issue by detecting the case where both the
	source and destination encoding are non-ASCII compatible, and
	transcoding the source string from the non-ASCII compatible
	encoding to UTF-8. The xml escaping code will correctly handle
	the UTF-8 source string and the return the correctly encoded
	and escaped value.

	Fixes [Bug #12052]

	Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
	---
	 test/ruby/test_transcode.rb | 19 +++++++++++++++++++
	 transcode.c                 |  6 ++++++
	 2 files changed, 25 insertions(+)

	=?UTF-8?q?-=20add=20regression=20tests=20for=20U+6E7F=20(?=
	 =?UTF-8?q?=E6=B9=BF)=20in=20ISO-2022-JP?=
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	  In ISO-2022-JP, the bytes use to code are the same as those for "&lt;&gt;".
	  This adds regression tests to make sure that these bytes, when representing
	  湿, are NOT　escaped with encode("ISO-2022-JP, xml: :text) or similar.
	  These are additional regression tests for #12052.
	---
	 test/ruby/test_transcode.rb | 3 +++
	 1 file changed, 3 insertions(+)
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 7e8a9af9db42a21f6a1125a29e98c45ff9d5833b: [Backport #17732]</title>
<updated>2021-04-02T07:06:31+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2021-04-02T07:06:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4e2738f477b5343a0d48a400c975220fed123c9b'/>
<id>4e2738f477b5343a0d48a400c975220fed123c9b</id>
<content type='text'>
	rb_enc_interned_str: handle autoloaded encodings

	If called with an autoloaded encoding that was not yet
	initialized, `rb_enc_interned_str` would crash with
	a NULL pointer exception.

	See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841
	---
	 encoding.c                        | 28 ++++++++++++----------------
	 ext/-test-/string/depend          |  3 +++
	 ext/-test-/string/fstring.c       | 15 +++++++++++++++
	 internal/encoding.h               |  3 +++
	 string.c                          |  4 ++++
	 test/-ext-/string/test_fstring.rb | 16 ++++++++++++++++
	 6 files changed, 53 insertions(+), 16 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	rb_enc_interned_str: handle autoloaded encodings

	If called with an autoloaded encoding that was not yet
	initialized, `rb_enc_interned_str` would crash with
	a NULL pointer exception.

	See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841
	---
	 encoding.c                        | 28 ++++++++++++----------------
	 ext/-test-/string/depend          |  3 +++
	 ext/-test-/string/fstring.c       | 15 +++++++++++++++
	 internal/encoding.h               |  3 +++
	 string.c                          |  4 ++++
	 test/-ext-/string/test_fstring.rb | 16 ++++++++++++++++
	 6 files changed, 53 insertions(+), 16 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>[memory_view] Make some rb_memroy_view_t members const</title>
<updated>2020-12-23T00:24:55+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@mrkn.jp</email>
</author>
<published>2020-12-22T15:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=01ab29cc285ec92c07cd67db6f8616690bd217f8'/>
<id>01ab29cc285ec92c07cd67db6f8616690bd217f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[memory_view] Remove needless use of StringValueCStr</title>
<updated>2020-12-23T00:24:54+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@mrkn.jp</email>
</author>
<published>2020-12-22T15:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=db0385d6576bb9d2486e799c935e6b1fa1e7dfcc'/>
<id>db0385d6576bb9d2486e799c935e6b1fa1e7dfcc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[memory_view] Add mdview_release_view for test</title>
<updated>2020-12-23T00:24:54+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@mrkn.jp</email>
</author>
<published>2020-12-22T15:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b3ea828c8ef92f2fab4646f72144f7c468339a81'/>
<id>b3ea828c8ef92f2fab4646f72144f7c468339a81</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[memory_view][fiddle] Rename len to byte_size in rb_memory_view_t</title>
<updated>2020-12-23T00:24:53+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@mrkn.jp</email>
</author>
<published>2020-12-22T15:33:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=74652e640a3ef50eb5442eb98438e3d634a4faf7'/>
<id>74652e640a3ef50eb5442eb98438e3d634a4faf7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[memory_view][fiddle] Use bool for boolean return value</title>
<updated>2020-12-23T00:05:07+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@mrkn.jp</email>
</author>
<published>2020-12-22T08:33:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=05014dcb887681d986105653ab527da2c4ff7774'/>
<id>05014dcb887681d986105653ab527da2c4ff7774</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
