Skip to content

Commit b973a95

Browse files
committed
Fix ruby 3.4 compatibility
1 parent 91bb771 commit b973a95

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3'] # 3.4+ is not yet supported by google-protobuf
11+
ruby:
12+
- '2.7'
13+
- '3.0'
14+
- '3.1'
15+
- '3.2'
16+
- '3.3'
17+
# Note: 3.4+ is not yet supported by google-protobuf
18+
- '3.4.0-rc1'
1219
os: ['ubuntu-latest', 'windows-latest']
1320
runs-on: ${{ matrix.os }}
1421
steps:
15-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
1623
- uses: ruby/setup-ruby@v1
1724
with:
1825
ruby-version: ${{ matrix.ruby }}
@@ -21,4 +28,4 @@ jobs:
2128
run: bundle exec rake test
2229
- name: RuboCop
2330
run: bundle exec rake lint
24-
if: matrix.ruby != '3.1' && matrix.ruby != '3.2' && matrix.ruby != '3.3'
31+
if: matrix.ruby != '3.1' && matrix.ruby != '3.2' && matrix.ruby != '3.3' && matrix.ruby != '3.4.0-rc1'

lib/pg_query.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require 'pg_query/pg_query_pb'
55
require 'pg_query/node'
66

7-
require 'pg_query/pg_query'
7+
require 'pg_query/pg_query' unless RUBY_VERSION >= '3.4.0'
88
require 'pg_query/constants'
99
require 'pg_query/parse'
1010
require 'pg_query/treewalker'

0 commit comments

Comments
 (0)