Skip to content

Commit

Permalink
Fix ruby 3.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Dec 20, 2024
1 parent 91bb771 commit b973a95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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'
2 changes: 1 addition & 1 deletion lib/pg_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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_VERSION >= '3.4.0'
require 'pg_query/constants'
require 'pg_query/parse'
require 'pg_query/treewalker'
Expand Down

0 comments on commit b973a95

Please sign in to comment.