Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Jan 7, 2026

Which issue(s) this PR fixes:
Backport #5213
Fixes #

What this PR does / why we need it:
When edit Windows registry like ruby bin/fluentd --reg-winsvc-fluentdopt "-c '$current_path/duplicated_id.conf' -o '$log_path'",
Ruby 4.0 causes uninitialized constant Win32::Registry (NameError).

Ref. https://github.com/fluent/fluentd/actions/runs/20650937408/job/59296698869

Ruby 3.4 has bundled resolv v0.6.2, which loads win32/registry.
https://github.com/ruby/resolv/blob/a28aaed4cb700303227f0e81178baf93d6221621/ext/win32/resolv/lib/resolv.rb#L46C15-L46C31
Therefore, we can use Win32::Registry implicitly after loading resolv.

It has been removed in the latest version of resolv gem.

Docs Changes:

Release Note:

…5213)

**Which issue(s) this PR fixes**:
Fixes #

**What this PR does / why we need it**:
When edit Windows registry like `ruby bin/fluentd
--reg-winsvc-fluentdopt "-c '$current_path/duplicated_id.conf' -o
'$log_path'"`,
Ruby 4.0 causes `uninitialized constant Win32::Registry (NameError)`.

Ref.
https://github.com/fluent/fluentd/actions/runs/20650937408/job/59296698869

Ruby 3.4 has bundled resolv v0.6.2, which loads `win32/registry`.

https://github.com/ruby/resolv/blob/a28aaed4cb700303227f0e81178baf93d6221621/ext/win32/resolv/lib/resolv.rb#L46C15-L46C31
Therefore, we can use `Win32::Registry` implicitly after loading resolv.

It has been removed in the latest version of resolv gem.

**Docs Changes**:

**Release Note**:

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@Watson1978 Watson1978 added this to the v1.19.2 milestone Jan 7, 2026
@Watson1978 Watson1978 merged commit c853f9a into v1.19 Jan 8, 2026
1 check passed
@Watson1978 Watson1978 deleted the backport-to-v1.19/pr5213 branch January 8, 2026 03:05
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