From 52b98a2a92767198335a1c43f5747a4a16d8a0c2 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Thu, 19 Dec 2024 09:44:01 +0800 Subject: [PATCH] Fix ruby 3.4 compatibility --- .github/workflows/ci.yml | 13 ++++++++++--- lib/pg_query.rb | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1d901df..01fecdee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,18 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '3.0', '3.1', '3.2', '3.3'] # 3.4+ is not yet supported by google-protobuf + ruby: + - '2.7' + - '3.0' + - '3.1' + - '3.2' + - '3.3' + # Note: 3.4+ is not yet supported by google-protobuf + - '3.4.0-rc1' os: ['ubuntu-latest', 'windows-latest'] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} @@ -21,4 +28,4 @@ jobs: run: bundle exec rake test - name: RuboCop run: bundle exec rake lint - if: matrix.ruby != '3.1' && matrix.ruby != '3.2' && matrix.ruby != '3.3' + if: matrix.ruby != '3.1' && matrix.ruby != '3.2' && matrix.ruby != '3.3' && matrix.ruby != '3.4.0-rc1' diff --git a/lib/pg_query.rb b/lib/pg_query.rb index 4d94b58b..1e4f9905 100644 --- a/lib/pg_query.rb +++ b/lib/pg_query.rb @@ -4,7 +4,7 @@ require 'pg_query/pg_query_pb' require 'pg_query/node' -require 'pg_query/pg_query' +require 'pg_query/pg_query' unless RUBY_PLATFORM >= '3.4.0' require 'pg_query/constants' require 'pg_query/parse' require 'pg_query/treewalker'