Skip to content

Fix embedded parser redefinition warnings#323

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

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

Conversation

@ydah
Copy link
Copy Markdown
Member

@ydah ydah commented Apr 9, 2026

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

@ydah ydah force-pushed the fix/embedded-parser-redefinition-warning branch from 8b4e649 to ca98887 Compare April 9, 2026 11:02
@ydah ydah force-pushed the fix/embedded-parser-redefinition-warning branch from ca98887 to 3957ec2 Compare April 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 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.

2 participants