Skip to content

Fix HTML generation for RBS constants without values - #1693

Closed
oiahoon wants to merge 1 commit into
lsegal:mainfrom
oiahoon:fix/render-rbs-constants-without-values
Closed

Fix HTML generation for RBS constants without values#1693
oiahoon wants to merge 1 commit into
lsegal:mainfrom
oiahoon:fix/render-rbs-constants-without-values

Conversation

@oiahoon

@oiahoon oiahoon commented Jul 14, 2026

Copy link
Copy Markdown

Description

Fixes #1686.

RBS constant declarations carry a type but no Ruby source value. Render a missing constant value as empty content so the default module template can generate the class page instead of raising NoMethodError.

This includes direct helper coverage, a template-level RBS regression, and the main changelog entry.

Validation

  • bundle exec rspec spec/handlers/rbs/constant_handler_spec.rb spec/templates/helpers/method_helper_spec.rb spec/templates/module_spec.rb — 26 examples, 0 failures
  • bundle exec rake — 2,786 examples, 0 failures; documentation check passed
  • Exact CLI reproduction generated Foo.html with BAR and an empty source-value block
  • npx --yes @biomejs/biome format — passed
  • npx --yes @biomejs/biome lint — passed with four existing warnings in unchanged JavaScript files
  • Ruby syntax checks and git diff --check — passed

Completed Tasks

  • I have read the Contributing Guide.
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).

@lsegal

lsegal commented Jul 14, 2026

Copy link
Copy Markdown
Owner

A very oddly timed duplicate of #1692.

@lsegal lsegal closed this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTML generation crashes for classes with constant declarations in .rbs files

2 participants