Skip to content

Commit

Permalink
ruby2_keywords is not an instance method
Browse files Browse the repository at this point in the history
  • Loading branch information
znz authored and picandocodigo committed Nov 28, 2023
1 parent 8fe0a55 commit d9c494e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elasticsearch-model/lib/elasticsearch/model/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit d9c494e

Please sign in to comment.