Commit 63ee9eb
authored
command/fluentd: load win32/registry when edit registry for Ruby 4.0 (#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>1 parent 088cb0c commit 63ee9eb
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| |||
0 commit comments