Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store absolute path of main at load time #7932

Merged
merged 1 commit into from Sep 10, 2023

Conversation

headius
Copy link
Member

@headius headius commented Sep 10, 2023

This fix allows dir and Thread::Backtrace::Location and require_relative to use the proper path for a main script specified without a full path.

It's a big hacky to store the path specifically for the main script this way, but it's the only such special case and works well enough to get these cases working.

Fixes #7394

Backported from master.

This fix allows __dir__ and Thread::Backtrace::Location and
require_relative to use the proper path for a main script
specified without a full path.

It's a big hacky to store the path specifically for the main
script this way, but it's the only such special case and works
well enough to get these cases working.

Fixes jruby#7394
@headius headius added this to the JRuby 9.3.11.0 milestone Sep 10, 2023
@headius headius merged commit 02531b3 into jruby:jruby-9.3 Sep 10, 2023
52 of 54 checks passed
@headius headius deleted the backport_main_cwd_fix branch September 10, 2023 09:40
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.

None yet

1 participant