<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_exception.rb, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Make invalid &amp; operator type error message consistent with */**</title>
<updated>2025-09-06T15:52:45+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2025-09-06T05:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=953e1ef99283d8563ff655ee6b8fcd681af79c1c'/>
<id>953e1ef99283d8563ff655ee6b8fcd681af79c1c</id>
<content type='text'>
If #to_proc is defined, this uses the following error message format,
matching the error message format used for * when to_a returns non-Array
and for ** when to_hash returns non-Hash:

```
can't convert ClassName to Proc (ClassName#to_proc gives OtherClassName)
```

If #to_proc is not defined, this uses the following error message format,
matching the error message format used when ** is called on a non-Hash
not implementing to_hash.

```
no implicit conversion of ClassName into Proc
```

There isn't a similar error for * when called on a non-Array not
implementing to_a, as Ruby does not raise for that case.

Fixes [Bug #21563]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If #to_proc is defined, this uses the following error message format,
matching the error message format used for * when to_a returns non-Array
and for ** when to_hash returns non-Hash:

```
can't convert ClassName to Proc (ClassName#to_proc gives OtherClassName)
```

If #to_proc is not defined, this uses the following error message format,
matching the error message format used when ** is called on a non-Hash
not implementing to_hash.

```
no implicit conversion of ClassName into Proc
```

There isn't a similar error for * when called on a non-Array not
implementing to_a, as Ruby does not raise for that case.

Fixes [Bug #21563]
</pre>
</div>
</content>
</entry>
<entry>
<title>Update ruby test for colon-style hash inspect</title>
<updated>2024-10-03T09:47:09+00:00</updated>
<author>
<name>tompng</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-06-07T15:23:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7237af75d2aa700454fbaba9bda7a9283413d903'/>
<id>7237af75d2aa700454fbaba9bda7a9283413d903</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PRISM] Fix up test exception assertion for Prism</title>
<updated>2024-08-21T14:34:12+00:00</updated>
<author>
<name>Kevin Newton</name>
<email>kddnewton@gmail.com</email>
</author>
<published>2024-08-21T14:34:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2bc141f2b6c17485971199974c7bd012b0c61c82'/>
<id>2bc141f2b6c17485971199974c7bd012b0c61c82</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Cover all warning categories by using `Warning.categories`</title>
<updated>2024-03-15T12:54:55+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-03-15T09:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1d91a1ad2db353aad37894a3e4a3756d5dd51413'/>
<id>1d91a1ad2db353aad37894a3e4a3756d5dd51413</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Test deprecation warning with `$;`</title>
<updated>2024-03-15T12:54:55+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-03-15T09:31:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=03e7b266a7be342e22c00725040266c1abbcba59'/>
<id>03e7b266a7be342e22c00725040266c1abbcba59</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>`Exception#set_backtrace` accept arrays of `Backtrace::Location`</title>
<updated>2024-03-14T10:38:40+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2024-02-19T10:30:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=315bde5a0f95562f58405a43456ec6715ef20d32'/>
<id>315bde5a0f95562f58405a43456ec6715ef20d32</id>
<content type='text'>
[Feature #13557]

Setting the backtrace with an array of strings is lossy. The resulting
exception will return nil on `#backtrace_locations`.

By accepting an array of `Backtrace::Location` instance, we can rebuild
a `Backtrace` instance and have a fully functioning Exception.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #13557]

Setting the backtrace with an array of strings is lossy. The resulting
exception will return nil on `#backtrace_locations`.

By accepting an array of `Backtrace::Location` instance, we can rebuild
a `Backtrace` instance and have a fully functioning Exception.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip under_gc_compact_stress on s390x (#10073)</title>
<updated>2024-02-22T22:34:19+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-02-22T22:34:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bccf4b30fa251dd4394d4ad477bad53c624d2aba'/>
<id>bccf4b30fa251dd4394d4ad477bad53c624d2aba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not include a backtick in error messages and backtraces</title>
<updated>2024-02-15T09:42:31+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-01-19T07:03:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=25d74b9527cd525042ad0b612b794fa331d3a318'/>
<id>25d74b9527cd525042ad0b612b794fa331d3a318</id>
<content type='text'>
[Feature #16495]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #16495]
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test for `Errno` constants</title>
<updated>2024-01-13T15:24:14+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-01-13T15:24:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4e5754a459ea10c73381b3009bb889e83077575c'/>
<id>4e5754a459ea10c73381b3009bb889e83077575c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Exception#detailed_message for GC compaction</title>
<updated>2024-01-02T17:03:31+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-01-02T15:07:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b959263b58e26ef630c085f9f7ddc04373a998c7'/>
<id>b959263b58e26ef630c085f9f7ddc04373a998c7</id>
<content type='text'>
Before this commit, the test fails with RGENGC_CHECK_MODE enabled:

    TestException#test_detailed_message_under_gc_compact_stress [test/ruby/test_exception.rb:1466]:
    &lt;"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" +
    "\e[1mbar\e[m\n" +
    "\e[1mbaz\e[m"&gt; expected but was
    &lt;"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" +
    "\e[1m\x00\x00\x00\x00\x00\x00\x00\e[m"&gt;.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, the test fails with RGENGC_CHECK_MODE enabled:

    TestException#test_detailed_message_under_gc_compact_stress [test/ruby/test_exception.rb:1466]:
    &lt;"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" +
    "\e[1mbar\e[m\n" +
    "\e[1mbaz\e[m"&gt; expected but was
    &lt;"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" +
    "\e[1m\x00\x00\x00\x00\x00\x00\x00\e[m"&gt;.
</pre>
</div>
</content>
</entry>
</feed>
