<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_module.rb, branch v3_3_11</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) f69ad0e810e1fdc18dc12f77bbecfa49999ef3bf: [Backport #21094]</title>
<updated>2025-03-29T07:49:59+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-03-29T07:49:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aac5c546cd35ff0aeab120e3724fbb1296892ae3'/>
<id>aac5c546cd35ff0aeab120e3724fbb1296892ae3</id>
<content type='text'>
	[Bug #21094] Update nested module names when setting temporary name
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #21094] Update nested module names when setting temporary name
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 931ac960b6d11937364b6c4e847fdd575ee67980: [Backport #21159]</title>
<updated>2025-03-16T06:39:32+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-03-16T06:39:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1d3c19871d7a0d05a0f0a80e78cfad843b7ef324'/>
<id>1d3c19871d7a0d05a0f0a80e78cfad843b7ef324</id>
<content type='text'>
	[Bug #21159] module names should not be modifiable
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #21159] module names should not be modifiable
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 3b7892b6e4d1a1a5d6019987f9b46ed443dd104f: [Backport #20871]</title>
<updated>2025-01-15T01:48:57+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-01-15T01:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8506fdfb4aca5262940b9c49827c2a839f6bb1fe'/>
<id>8506fdfb4aca5262940b9c49827c2a839f6bb1fe</id>
<content type='text'>
	Fix a bug in rb_include_module that stops nested inclusion into module subclasses

	This bug was present since the code was originally added by me
	in 3556a834a2847e52162d1d3302d4c64390df1694.

	Fixes [Bug #20871]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Fix a bug in rb_include_module that stops nested inclusion into module subclasses

	This bug was present since the code was originally added by me
	in 3556a834a2847e52162d1d3302d4c64390df1694.

	Fixes [Bug #20871]
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 01fd262e62076277a41af72ea13f20deb1b462a2: [Backport #20245] (#10307)</title>
<updated>2024-03-21T00:05:07+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>nurse@users.noreply.github.com</email>
</author>
<published>2024-03-21T00:05:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b2c2702f20abfd4bb5f38cad60170e2bbb3adff9'/>
<id>b2c2702f20abfd4bb5f38cad60170e2bbb3adff9</id>
<content type='text'>
Fix crash when checking symbol encoding

	[Bug #20245]

	We sometimes pass in a fake string to sym_check_asciionly. This can crash
	if sym_check_asciionly raises because it creates a CFP with the fake
	string as the receiver which will crash if GC tries to mark the CFP.

	For example, the following script crashes:

	    GC.stress = true
	    Object.const_defined?("\xC3")</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix crash when checking symbol encoding

	[Bug #20245]

	We sometimes pass in a fake string to sym_check_asciionly. This can crash
	if sym_check_asciionly raises because it creates a CFP with the fake
	string as the receiver which will crash if GC tries to mark the CFP.

	For example, the following script crashes:

	    GC.stress = true
	    Object.const_defined?("\xC3")</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19901]</title>
<updated>2023-09-23T21:10:46+00:00</updated>
<author>
<name>Adam Hess</name>
<email>HParker@github.com</email>
</author>
<published>2023-09-23T19:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c42261059dfebabbf0391327a5e077545a9bc438'/>
<id>c42261059dfebabbf0391327a5e077545a9bc438</id>
<content type='text'>
fix leak in module clone

Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix leak in module clone

Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19896]</title>
<updated>2023-09-22T13:44:58+00:00</updated>
<author>
<name>Adam Hess</name>
<email>adamhess1991@gmail.com</email>
</author>
<published>2023-09-20T16:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8b236e0c66da8f92e9fc33de66cfbc8e4b0c0763'/>
<id>8b236e0c66da8f92e9fc33de66cfbc8e4b0c0763</id>
<content type='text'>
fix memory leak in vm_method

This introduces a unified reference_count to clarify who is referencing a method.
This also allows us to treat the refinement method as the def owner since it counts itself as a reference

Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix memory leak in vm_method

This introduces a unified reference_count to clarify who is referencing a method.
This also allows us to treat the refinement method as the def owner since it counts itself as a reference

Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory leak in complemented method entries</title>
<updated>2023-09-20T14:19:24+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-09-20T00:48:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=96c5a4be7b0d72502001734770af0f4a735c544c'/>
<id>96c5a4be7b0d72502001734770af0f4a735c544c</id>
<content type='text'>
[Bug #19894]

When a copy of a complemented method entry is created, there are two
issues:

1. IMEMO_FL_USER3 is not copied, so the complemented status is not
   copied over.
2. In rb_method_entry_clone we increment both alias_count and
   complemented_count. However, when we free the method entry in
   rb_method_definition_release, we only decrement one of the two
   counters, resulting in the rb_method_definition_t being leaked.

Co-authored-by: Adam Hess &lt;adamhess1991@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #19894]

When a copy of a complemented method entry is created, there are two
issues:

1. IMEMO_FL_USER3 is not copied, so the complemented status is not
   copied over.
2. In rb_method_entry_clone we increment both alias_count and
   complemented_count. However, when we free the method entry in
   rb_method_definition_release, we only decrement one of the two
   counters, resulting in the rb_method_definition_t being leaked.

Co-authored-by: Adam Hess &lt;adamhess1991@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Attrset name is not allowed as an attribute</title>
<updated>2023-06-03T11:50:40+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-06-03T11:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=73a31546aa2ceaa4de1ae9d52b1b46993a3f2be6'/>
<id>73a31546aa2ceaa4de1ae9d52b1b46993a3f2be6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory leak for iclass</title>
<updated>2023-03-28T12:20:06+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-03-27T17:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=417b1a36447cb2c650de55b433ba623541fb8bb3'/>
<id>417b1a36447cb2c650de55b433ba623541fb8bb3</id>
<content type='text'>
[Bug #19550]

If !RCLASS_EXT_EMBEDDED (e.g. 32 bit systems) then the rb_classext_t is
allocated throug malloc so it must be freed.

The issue can be seen in the following script:

```
20.times do
  100_000.times do
    mod = Module.new
    Class.new do
      include mod
    end
  end

  # Output the Resident Set Size (memory usage, in KB) of the current Ruby process
  puts `ps -o rss= -p #{$$}`
end
```

Before this fix, the max RSS is 280MB, while after this change, it's
30MB.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #19550]

If !RCLASS_EXT_EMBEDDED (e.g. 32 bit systems) then the rb_classext_t is
allocated throug malloc so it must be freed.

The issue can be seen in the following script:

```
20.times do
  100_000.times do
    mod = Module.new
    Class.new do
      include mod
    end
  end

  # Output the Resident Set Size (memory usage, in KB) of the current Ruby process
  puts `ps -o rss= -p #{$$}`
end
```

Before this fix, the max RSS is 280MB, while after this change, it's
30MB.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix small issues concerning namespacing in test-all suite</title>
<updated>2023-03-16T23:46:37+00:00</updated>
<author>
<name>lukeg</name>
<email>luke.gru@gmail.com</email>
</author>
<published>2023-03-13T22:13:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d2c6dca8f4a9fb3e6b9748758ee9eb75fa18622a'/>
<id>d2c6dca8f4a9fb3e6b9748758ee9eb75fa18622a</id>
<content type='text'>
* Fix temporary methods on Object leaking across test cases.
* Remove temporary classes/modules leaking across test cases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix temporary methods on Object leaking across test cases.
* Remove temporary classes/modules leaking across test cases.
</pre>
</div>
</content>
</entry>
</feed>
