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 #7931

Merged
merged 1 commit into from Sep 10, 2023

Conversation

headius
Copy link
Member

@headius headius commented Sep 9, 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.

Fixes #7394

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 9, 2023
@headius headius merged commit b10f38f into jruby:master Sep 10, 2023
48 checks passed
@headius headius deleted the main_absolute_path_fixes branch September 10, 2023 08:57
@headius headius modified the milestones: JRuby 9.3.11.0, JRuby 9.4.4.0 Sep 10, 2023
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.

require_relative confused by chdir
1 participant