From 61a3d6d9bb1f1a737f8165919cc965e7a90eaf45 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Tue, 28 Nov 2023 15:59:16 +0900 Subject: [PATCH] `ruby2_keywords` is not an instance method --- elasticsearch-model/lib/elasticsearch/model/proxy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-model/lib/elasticsearch/model/proxy.rb b/elasticsearch-model/lib/elasticsearch/model/proxy.rb index 6fdf66322..69a6059d2 100644 --- a/elasticsearch-model/lib/elasticsearch/model/proxy.rb +++ b/elasticsearch-model/lib/elasticsearch/model/proxy.rb @@ -115,7 +115,7 @@ def initialize(target) @target = target end - def ruby2_keywords(*) # :nodoc: + def self.ruby2_keywords(*) # :nodoc: end if RUBY_VERSION < "2.7" # Delegate methods to `@target`. As per [the Ruby 3.0 explanation for keyword arguments](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/), the only way to work on Ruby <2.7, and 2.7, and 3.0+ is to use `ruby2_keywords`.