From 426b5aced47c16606d0d78efbfbb4d91027e058a Mon Sep 17 00:00:00 2001 From: Oleh Fedorenko Date: Fri, 10 Nov 2023 17:53:06 +0000 Subject: [PATCH] Fixes #36849 - Run GHA on Ruby 3.0 --- .github/matrix.json | 2 +- app/models/host.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/matrix.json b/.github/matrix.json index 81e37ac5f94..f15a18dd692 100644 --- a/.github/matrix.json +++ b/.github/matrix.json @@ -1,5 +1,5 @@ { "postgresql": ["12"], - "ruby": ["2.7"], + "ruby": ["2.7", "3.0"], "node": ["14"] } diff --git a/app/models/host.rb b/app/models/host.rb index 12d7d98593e..d7fa2cb03f4 100644 --- a/app/models/host.rb +++ b/app/models/host.rb @@ -12,7 +12,11 @@ def self.method_missing(method, *args, &block) end end if type.constantize.respond_to?(method, true) - type.constantize.send(method, *args, &block) + if method.to_s.start_with?('find_in_') && args.size == 1 && args[0].is_a?(Hash) + type.constantize.send(method, **args[0], &block) + else + type.constantize.send(method, *args, &block) + end else super end