Skip to content

Preserve absolute Ruby constant references - #8

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
preserve-absolute-superclass
Aug 15, 2026
Merged

Preserve absolute Ruby constant references#8
samuel-williams-shopify merged 1 commit into
mainfrom
preserve-absolute-superclass

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Decode currently loses the leading :: when parsing nested Ruby constant references. This makes an absolute superclass such as ::Parent indistinguishable from the relative Parent.

Preserve the leading :: in nested_name_for, while retaining the existing representation for qualified constants such as My::Parent.

This is needed to resolve superclass references correctly for socketry/utopia-project#3.

Tests cover both qualified and absolute superclass names.

Checks:

  • bundle exec bake test
  • bundle exec rubocop

@samuel-williams-shopify
samuel-williams-shopify force-pushed the preserve-absolute-superclass branch from 462a914 to 3fb1047 Compare August 15, 2026 22:32
@samuel-williams-shopify
samuel-williams-shopify merged commit e391383 into main Aug 15, 2026
40 of 42 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the preserve-absolute-superclass branch August 15, 2026 22:35
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.

1 participant