<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/rdoc/code_object/class_module.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>Sync RDoc 6.14.0</title>
<updated>2025-05-22T22:04:47+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2025-05-22T21:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=03eb777c69d64aa4941891a784c1fd67b44ea42c'/>
<id>03eb777c69d64aa4941891a784c1fd67b44ea42c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] ClassModule#superclass= accepts a ClassModule as an</title>
<updated>2024-12-02T22:07:31+00:00</updated>
<author>
<name>Mike Dalessio</name>
<email>mike.dalessio@gmail.com</email>
</author>
<published>2024-12-02T22:07:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4cce246d86d8ce16f13cfbbec465e0279d060f7f'/>
<id>4cce246d86d8ce16f13cfbbec465e0279d060f7f</id>
<content type='text'>
argument
(https://github.com/ruby/rdoc/pull/1222)

It is necessary for ClassModule's instance variable @superclass to
always be a String (or nil) so that the class can be saved with
`#marshal_dump` and loaded with `#marshal_load`.

However, there's no type checking being done, which allows a bug like
the one reported in #1221 (which was introduced in #1217) that sets
superclass to a ClassModule. That bug requires:

- setting a superclass to a NormalClass
- marshal_save
- marshal_load (which raises an exception)

With this change, passing a ClassModule to ClassModule#superclass= is
explicitly allowed by saving the full name of the ClassModule in the
@superclass instance variable.

https://github.com/ruby/rdoc/commit/9ced6d534c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
argument
(https://github.com/ruby/rdoc/pull/1222)

It is necessary for ClassModule's instance variable @superclass to
always be a String (or nil) so that the class can be saved with
`#marshal_dump` and loaded with `#marshal_load`.

However, there's no type checking being done, which allows a bug like
the one reported in #1221 (which was introduced in #1217) that sets
superclass to a ClassModule. That bug requires:

- setting a superclass to a NormalClass
- marshal_save
- marshal_load (which raises an exception)

With this change, passing a ClassModule to ClassModule#superclass= is
explicitly allowed by saving the full name of the ClassModule in the
@superclass instance variable.

https://github.com/ruby/rdoc/commit/9ced6d534c
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] Display class ancestors in the sidebar #1183</title>
<updated>2024-11-04T17:34:27+00:00</updated>
<author>
<name>Alexis Bernard</name>
<email>alexis@bernard.io</email>
</author>
<published>2024-11-04T17:34:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7ae4b858b3ab7b51a6bda388414adf27fd71c23b'/>
<id>7ae4b858b3ab7b51a6bda388414adf27fd71c23b</id>
<content type='text'>
https://github.com/ruby/rdoc/commit/50dda13426
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/rdoc/commit/50dda13426
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] feature: Render mixed-in methods and constants with</title>
<updated>2024-10-17T20:40:34+00:00</updated>
<author>
<name>Mike Dalessio</name>
<email>mike.dalessio@gmail.com</email>
</author>
<published>2024-10-17T20:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0b38e184881839d347a777e82ad1b037a1aeca6e'/>
<id>0b38e184881839d347a777e82ad1b037a1aeca6e</id>
<content type='text'>
`--embed-mixins`
(https://github.com/ruby/rdoc/pull/842)

* Embed mixed-in methods and constants with `--embed-mixins`

When `--embed-mixins` option is set:

- methods from an `extend`ed module are documented as singleton methods
- attrs from an `extend`ed module are documented as class attributes
- methods from an `include`ed module are documented as instance methods
- attrs from an `include`ed module are documented as instance attributes
- constants from an `include`ed module are documented

Sections are created when needed, and Darkfish's template annotates
each of these mixed-in CodeObjects. We also respect the mixin methods'
visibility.

This feature is inspired by Yard's option of the same name.

* Add comment to document why we set object visibility

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Add the mixin_from attribute to CodeObject's initializer

* Add test coverage for private mixed-in attributes.

---------

https://github.com/ruby/rdoc/commit/481c2ce660

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`--embed-mixins`
(https://github.com/ruby/rdoc/pull/842)

* Embed mixed-in methods and constants with `--embed-mixins`

When `--embed-mixins` option is set:

- methods from an `extend`ed module are documented as singleton methods
- attrs from an `extend`ed module are documented as class attributes
- methods from an `include`ed module are documented as instance methods
- attrs from an `include`ed module are documented as instance attributes
- constants from an `include`ed module are documented

Sections are created when needed, and Darkfish's template annotates
each of these mixed-in CodeObjects. We also respect the mixin methods'
visibility.

This feature is inspired by Yard's option of the same name.

* Add comment to document why we set object visibility

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Add the mixin_from attribute to CodeObject's initializer

* Add test coverage for private mixed-in attributes.

---------

https://github.com/ruby/rdoc/commit/481c2ce660

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rdoc] Group code object files into the same directory</title>
<updated>2024-07-02T10:15:00+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-07-02T10:14:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d7af8afe1b85b8de04cd77c673b0f6ef3f3627fa'/>
<id>d7af8afe1b85b8de04cd77c673b0f6ef3f3627fa</id>
<content type='text'>
(https://github.com/ruby/rdoc/pull/1114)

It's hard to distinguish code object classes by their file names alone.
And given that we have 18 such classes, it'd make the codebase a lot
easier to understand if we grouped them into a single directory.

Given that these classes are all autoloaded in `lib/rdoc.rb` instead
of required individually, this change should have minimum impact on
projects using RDoc as they generally just require `rdoc`, not individual
files. An example is Rails' `sdoc`:
https://github.com/rails/sdoc/blob/main/lib/sdoc/rdoc_monkey_patches.rb

https://github.com/ruby/rdoc/commit/4211292ffe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/rdoc/pull/1114)

It's hard to distinguish code object classes by their file names alone.
And given that we have 18 such classes, it'd make the codebase a lot
easier to understand if we grouped them into a single directory.

Given that these classes are all autoloaded in `lib/rdoc.rb` instead
of required individually, this change should have minimum impact on
projects using RDoc as they generally just require `rdoc`, not individual
files. An example is Rails' `sdoc`:
https://github.com/rails/sdoc/blob/main/lib/sdoc/rdoc_monkey_patches.rb

https://github.com/ruby/rdoc/commit/4211292ffe
</pre>
</div>
</content>
</entry>
</feed>
