From 1334117cd98c0a0336c04fc5cb6a1af2cd4d8610 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Thu, 6 Feb 2025 17:48:45 +0900 Subject: [PATCH 1/2] github: add Ruby 3.4 for CI Signed-off-by: Kentaro Hayashi --- .github/workflows/linux-test.yaml | 2 +- .github/workflows/macos-test.yaml | 2 +- .github/workflows/windows-test.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-test.yaml b/.github/workflows/linux-test.yaml index 445ea7c..b90a28d 100644 --- a/.github/workflows/linux-test.yaml +++ b/.github/workflows/linux-test.yaml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.3', '3.2', '3.1', '3.0', '2.7'] + ruby: ['3.4', '3.3', '3.2', '3.1', '3.0', '2.7'] os: [ubuntu-latest] experimental: [false] include: diff --git a/.github/workflows/macos-test.yaml b/.github/workflows/macos-test.yaml index 18a2e2a..20efc68 100644 --- a/.github/workflows/macos-test.yaml +++ b/.github/workflows/macos-test.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.3', '3.2', '3.1', '3.0', '2.7'] + ruby: ['3.4', '3.3', '3.2', '3.1', '3.0', '2.7'] os: [macos-latest] name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }} diff --git a/.github/workflows/windows-test.yaml b/.github/workflows/windows-test.yaml index 186d0ad..e8f9ed5 100644 --- a/.github/workflows/windows-test.yaml +++ b/.github/workflows/windows-test.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['3.3', '3.2', '3.1', '3.0', '2.7'] + ruby: ['3.4', '3.3', '3.2', '3.1', '3.0', '2.7'] os: - windows-latest name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }} From 411ae40b51f5595e087b6aaac5ee37f05f2eacec Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Thu, 13 Feb 2025 11:20:16 +0900 Subject: [PATCH 2/2] Fix unexpected postposition resque and if behavior Since Ruby 3.4, postposition resque and if causes unexpected behavior. To keep compatibility with previous versions, use if condition. See https://bugs.ruby-lang.org/issues/21132 Signed-off-by: Kentaro Hayashi --- lib/fluent/plugin/parser_winevt_xml.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/fluent/plugin/parser_winevt_xml.rb b/lib/fluent/plugin/parser_winevt_xml.rb index 0963c11..34b5be2 100644 --- a/lib/fluent/plugin/parser_winevt_xml.rb +++ b/lib/fluent/plugin/parser_winevt_xml.rb @@ -20,7 +20,9 @@ def MAKELONG(low, high) end def event_id(system_elem) - return (system_elem/'EventID').text rescue nil if @preserve_qualifiers + if @preserve_qualifiers + return (system_elem/'EventID').text rescue nil + end qualifiers = (system_elem/'EventID').attribute("Qualifiers").text rescue nil if qualifiers