Skip to content

[pull] master from ruby:master#75

Merged
pull[bot] merged 1 commit intosysfce2:masterfrom
ruby:master
Nov 19, 2025
Merged

[pull] master from ruby:master#75
pull[bot] merged 1 commit intosysfce2:masterfrom
ruby:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Nov 19, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…sted module name (#1458)

Fixes #1440
Always track class and singleton class stored to a variable to
`@classes`.
Otherwise, `find_class var_name, class_name` called from `handle_method`
will add a new class.

Before:
<img width="303" height="167" alt="before"
src="https://github.com/user-attachments/assets/fb885b6c-40bf-44c5-8f01-095cfdc75c16"
/>
After:
<img width="303" height="167" alt="after"
src="https://github.com/user-attachments/assets/e0aae152-f46e-4954-8b68-23b74dd3bc90"
/>


Minimal reproduction:
```c
VALUE mFoo = rb_define_module("Foo");
VALUE mBar = rb_define_module_under(mFoo, "Bar");
VALUE mBarS = rb_singleton_class(mBar);
rb_define_method(mBarS, "baz", baz, 0);
```

`RDoc::Parser::C#handle_method` calls `find_class 'mBarS', 'Foo::Bar'`.
`RDoc::Parser::C#find_class` calls `@top_level.add_class
RDoc::NormalClass, 'Foo::Bar'`. This will create `::Bar` for some reason
and `Foo::Bar` disappears from generated document.
@pull pull bot locked and limited conversation to collaborators Nov 19, 2025
@pull pull bot added the ⤵️ pull label Nov 19, 2025
@pull pull bot merged commit fcb515f into sysfce2:master Nov 19, 2025
4 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant