<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_nomethod_error.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>Fix bad NameError raised using sendforward instruction through vcall</title>
<updated>2025-08-27T18:14:29+00:00</updated>
<author>
<name>Luke Gruber</name>
<email>luke.gruber@shopify.com</email>
</author>
<published>2025-08-27T13:26:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=886268856ba7c70a6eaf25eeb402e6ebed9e851e'/>
<id>886268856ba7c70a6eaf25eeb402e6ebed9e851e</id>
<content type='text'>
If you called a VCALL method and the method takes forwarding arguments
and then you forward those arguments along using the sendforward instruction,
the method_missing class was wrongly chosen as NameError instead of NoMethodError.
This is because the VM looked at the CallInfo of the vcall and determined it needed
to raise NameError. Now we detect that case and raise NoMethodError.

Fixes [Bug #21535]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you called a VCALL method and the method takes forwarding arguments
and then you forward those arguments along using the sendforward instruction,
the method_missing class was wrongly chosen as NameError instead of NoMethodError.
This is because the VM looked at the CallInfo of the vcall and determined it needed
to raise NameError. Now we detect that case and raise NoMethodError.

Fixes [Bug #21535]
</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>Update some tests for the new message format of NoMethodError</title>
<updated>2023-02-20T01:33:06+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2023-01-24T08:44:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8f868a1a65383359e565ed0c874e0d2cba95b0ee'/>
<id>8f868a1a65383359e565ed0c874e0d2cba95b0ee</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[WIP] add error_squiggle gem</title>
<updated>2021-06-29T14:45:49+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2021-06-18T08:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e94604966572bb43fc887856d54aa54b8e9f7719'/>
<id>e94604966572bb43fc887856d54aa54b8e9f7719</id>
<content type='text'>
```
$ ./local/bin/ruby -e '1.time {}'
-e:1:in `&lt;main&gt;': undefined method `time' for 1:Integer (NoMethodError)

1.time {}
 ^^^^^
Did you mean?  times
```

https://bugs.ruby-lang.org/issues/17930
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
$ ./local/bin/ruby -e '1.time {}'
-e:1:in `&lt;main&gt;': undefined method `time' for 1:Integer (NoMethodError)

1.time {}
 ^^^^^
Did you mean?  times
```

https://bugs.ruby-lang.org/issues/17930
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix segmentation fault when `Module#name` returns non string value [Bug #17754]</title>
<updated>2021-03-27T23:47:42+00:00</updated>
<author>
<name>Kenichi Kamiya</name>
<email>kachick1@gmail.com</email>
</author>
<published>2021-03-27T23:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0a544c0c35f7445d69402d7c53d825384c728017'/>
<id>0a544c0c35f7445d69402d7c53d825384c728017</id>
<content type='text'>
* Add test for NoMethodError#to_s does not segfault

* Ensure no segfault even if Module#name is overridden</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add test for NoMethodError#to_s does not segfault

* Ensure no segfault even if Module#name is overridden</pre>
</div>
</content>
</entry>
<entry>
<title>Make test for no method error more reliable</title>
<updated>2020-06-06T17:48:24+00:00</updated>
<author>
<name>Yuki Nishijima</name>
<email>yk.nishijima@gmail.com</email>
</author>
<published>2020-06-06T17:48:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6d4ab96c475e7187069f3f3733fac32d6e03257c'/>
<id>6d4ab96c475e7187069f3f3733fac32d6e03257c</id>
<content type='text'>
This test should not depend on the bahaviour of the did_you_mean gem.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test should not depend on the bahaviour of the did_you_mean gem.
</pre>
</div>
</content>
</entry>
<entry>
<title>Split test_nomethod_error.rb</title>
<updated>2019-12-31T10:43:36+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2019-12-31T05:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0cf75e38506a412a7b4acd39a93e32aff1e8016c'/>
<id>0cf75e38506a412a7b4acd39a93e32aff1e8016c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
