Skip to content

Fix embedded parser redefinition warnings - #323

Open
ydah wants to merge 1 commit into
ruby:masterfrom
ydah:fix/embedded-parser-redefinition-warning
Open

Fix embedded parser redefinition warnings#323
ydah wants to merge 1 commit into
ruby:masterfrom
ydah:fix/embedded-parser-redefinition-warning

Conversation

@ydah

@ydahydah commented Apr 9, 2026

Copy link
Copy Markdown
Member

Fix embedded parser runtime guards so they do not reload embedded files when $LOADED_FEATURES contains Windows-style backslash paths.

@ydah
ydahforce-pushed the fix/embedded-parser-redefinition-warning branch from 8b4e649 to ca98887CompareApril 9, 2026 11:02
@ydah
ydahforce-pushed the fix/embedded-parser-redefinition-warning branch from ca98887 to 3957ec2CompareApril 9, 2026 12:14
def embed_library(src)
line %[###### #{src.filename} begin]
line %[unless $".find {|p| p.end_with?('/#{src.filename}')}]
line %[unless $".find {|p| p.tr('\\\\', '/').end_with?('/#{src.filename}')}]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this make sense if File::ALT_SEPARATOR is nil?

Sign up for freeto 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.

2 participants

@ydah@nobu