Skip to content

Require the correct case for this library#8884

Merged
headius merged 1 commit intojruby:jruby-9.4from
headius:registry_win32api_require
Jul 1, 2025
Merged

Require the correct case for this library#8884
headius merged 1 commit intojruby:jruby-9.4from
headius:registry_win32api_require

Conversation

@headius
Copy link
Member

@headius headius commented Jul 1, 2025

The library was renamed to win32api some time ago and this require was never updated. A recent change to resolv.rb (7747175) now triggers loading win32/registry.rb, which in turn hits this incorrectly-cased require.

Whether the path should require successfully on Windows is a separate debate, but we mostly use JDK classes to check for the target file. That logic may not consider the two paths identical and not find the file on Windows.

When running inside a jar, all paths must be cased properly, so this will also fix the situation of running with jruby-complete on a Windows system.

Fixes #8866

The library was renamed to `win32api` some time ago and this
require was never updated. A recent change to resolv.rb (7747175)
now triggers loading win32/registry.rb, which in turn hits this
incorrectly-cased require.

Whether the path should require successfully on Windows is a
separate debate, but we mostly use JDK classes to check for the
target file. That logic may not consider the two paths identical
and not find the file on Windows.

When running inside a jar, all paths must be cased properly, so
this will also fix the situation of running with jruby-complete
on a Windows system.

Fixes jruby#8866
@headius headius added this to the JRuby 9.4.14.0 milestone Jul 1, 2025
@headius headius merged commit f4a56d3 into jruby:jruby-9.4 Jul 1, 2025
189 of 193 checks passed
@headius headius deleted the registry_win32api_require branch July 1, 2025 21:06
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