<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_super.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>vm_cc_new: don't assume `cme` is present. (#15322)</title>
<updated>2025-12-01T17:44:46+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-01T17:44:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3b09e559da73e63ff25156fcb9e892948c7b2afb'/>
<id>3b09e559da73e63ff25156fcb9e892948c7b2afb</id>
<content type='text'>
[Bug #21694]

`vm_search_super_method` explictly calls `vm_cc_new` with `cme=NULL`
when there is no super class.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21694]

`vm_search_super_method` explictly calls `vm_cc_new` with `cme=NULL`
when there is no super class.</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent method redefinition warnings in test</title>
<updated>2024-11-07T04:18:57+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-11-07T04:18:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f87ec81e087c14e3bff1f67177619a148caa6a11'/>
<id>f87ec81e087c14e3bff1f67177619a148caa6a11</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix method caching bug when including/prepend module A that prepends module B</title>
<updated>2024-09-19T14:34:01+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2024-09-10T03:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6118e8a47394409b53164b60e79fadf348b97db3'/>
<id>6118e8a47394409b53164b60e79fadf348b97db3</id>
<content type='text'>
Fix by always adding the generated iclass to the subclasses list,
otherwise the method cache for the iclass is not cleared when
the method in the module is overwritten.

Fixes [Bug #20716]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix by always adding the generated iclass to the subclasses list,
otherwise the method cache for the iclass is not cleared when
the method in the module is overwritten.

Fixes [Bug #20716]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix issue with super and forwarding arguments in prism_compile.c</title>
<updated>2024-09-11T20:41:46+00:00</updated>
<author>
<name>Luke Gruber</name>
<email>luke.gru@gmail.com</email>
</author>
<published>2024-09-07T16:17:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5d358b660d41e64de301f428dc0300a52a6f9566'/>
<id>5d358b660d41e64de301f428dc0300a52a6f9566</id>
<content type='text'>
Fixes [Bug #20720]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #20720]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix incorrect use of VM_CALL_KW_SPLAT_MUT in zsuper with keyword splat</title>
<updated>2024-01-26T04:43:42+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2024-01-25T20:44:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=771a2f039b9a059a73e8f111d1d46590fa697f63'/>
<id>771a2f039b9a059a73e8f111d1d46590fa697f63</id>
<content type='text'>
For zsuper calls with a keyword splat but no actual keywords, the
keyword splat is passed directly, so it cannot be mutable, because
if the callee accepts a keyword splat, changes to the keyword splat
by the callee would be reflected in the caller.

While here, simplify the logic when the method supports
literal keywords.  I don't think it is possible for
a method with has_kw param flags to not have keywords, so add an
assertion for that, and set VM_CALL_KW_SPLAT_MUT in a single place.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For zsuper calls with a keyword splat but no actual keywords, the
keyword splat is passed directly, so it cannot be mutable, because
if the callee accepts a keyword splat, changes to the keyword splat
by the callee would be reflected in the caller.

While here, simplify the logic when the method supports
literal keywords.  I don't think it is possible for
a method with has_kw param flags to not have keywords, so add an
assertion for that, and set VM_CALL_KW_SPLAT_MUT in a single place.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for cme NULL crash</title>
<updated>2021-11-17T18:20:31+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2021-11-17T14:07:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1454906d4e730312b175197182cf85581821ed5e'/>
<id>1454906d4e730312b175197182cf85581821ed5e</id>
<content type='text'>
Tests for GitHub PR #5122. Originally in GitHub PR #5121.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tests for GitHub PR #5122. Originally in GitHub PR #5121.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #18329] Fix crash when calling non-existent super method</title>
<updated>2021-11-11T19:08:38+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2021-11-11T16:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=84202963c52e02cecad3e6b2fad478bfbeee1bc7'/>
<id>84202963c52e02cecad3e6b2fad478bfbeee1bc7</id>
<content type='text'>
The cme is NULL when a method does not exist, so check it before
accessing the callcache.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The cme is NULL when a method does not exist, so check it before
accessing the callcache.
</pre>
</div>
</content>
</entry>
<entry>
<title>This test is not testing attr_writer</title>
<updated>2020-04-15T06:59:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-04-15T06:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1dad9fa5e1303ce0ba38f55ae81b87ab3857df62'/>
<id>1dad9fa5e1303ce0ba38f55ae81b87ab3857df62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Invalidate fastpath when calling attr_reader by super</title>
<updated>2020-04-15T06:49:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-04-15T06:49:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=79f3403be0cdbec814be29308c0583599ca5824f'/>
<id>79f3403be0cdbec814be29308c0583599ca5824f</id>
<content type='text'>
The same bug as 8355a99883 existed in attr_reader too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The same bug as 8355a99883 existed in attr_reader too.
</pre>
</div>
</content>
</entry>
<entry>
<title>Invalidate fastpath when calling attr_writer by super</title>
<updated>2020-04-15T06:32:13+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2020-04-15T06:24:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8355a998839f17ff214a89062821a0a4287f6a54'/>
<id>8355a998839f17ff214a89062821a0a4287f6a54</id>
<content type='text'>
We started to use fastpath on invokesuper when a method is not refinements
since 5c27681813, but we shouldn't have used fastpath for attr_writer either.

`cc-&gt;aux_.attr_index` is for an actual receiver class, while we store
its superclass in `cc-&gt;klass` and therefore there's no way to properly
invalidate attr_writer's inline cache when it's called by super.

[Bug #16785]

I suspect the same bug also exists in attr_reader. I'll address that in
another commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We started to use fastpath on invokesuper when a method is not refinements
since 5c27681813, but we shouldn't have used fastpath for attr_writer either.

`cc-&gt;aux_.attr_index` is for an actual receiver class, while we store
its superclass in `cc-&gt;klass` and therefore there's no way to properly
invalidate attr_writer's inline cache when it's called by super.

[Bug #16785]

I suspect the same bug also exists in attr_reader. I'll address that in
another commit.
</pre>
</div>
</content>
</entry>
</feed>
