Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with Ruby 3.2 #174

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ jobs:
- 6379:6379
strategy:
matrix:
ruby: [2.6, 2.7, 3.0]
ruby: ["2.6", "2.7", "3.0"]
gemfile: [rails_5_2, rails_6_0, rails_edge]
exclude:
- ruby: 2.6
- ruby: "2.6"
gemfile: rails_edge
- ruby: 3.0
- ruby: "3.0"
gemfile: rails_5_2
include:
- ruby: "3.1"
gemfile: rails_edge
- ruby: head
gemfile: rails_edge
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gemspec
gem "sidekiq"
gem "resque"

gem "mysql2", "~> 0.5"
gem "mysql2", github: "brianmario/mysql2"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the last published version no longer compile on modern rubies.

gem "globalid"
gem "i18n"
gem "redis"
Expand Down
11 changes: 8 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
GIT
remote: https://github.com/brianmario/mysql2
revision: 25c42c712118b046eb9df7a0f50ffde1a04ee6d1
specs:
mysql2 (0.5.3)

PATH
remote: .
specs:
Expand Down Expand Up @@ -42,7 +48,6 @@ GEM
multi_json (1.15.0)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
mysql2 (0.5.3)
parallel (1.21.0)
parser (3.1.0.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -109,7 +114,7 @@ DEPENDENCIES
i18n
job-iteration!
mocha
mysql2 (~> 0.5)
mysql2!
pry
rake
redis
Expand All @@ -120,4 +125,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.2.22
2.3.5
2 changes: 1 addition & 1 deletion lib/job-iteration/iteration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def run_complete_callbacks?(completed)
def valid_cursor_parameter?(parameters)
# this condition is when people use the splat operator.
# def build_enumerator(*)
return true if parameters == [[:rest]]
return true if parameters == [[:rest]] || parameters == [[:rest, :*]]

parameters.each do |parameter_type, parameter_name|
next unless parameter_name == :cursor
Expand Down