Skip to content

Commit

Permalink
fix proxying keyword arguments
Browse files Browse the repository at this point in the history
this resolves a bug with Rails 6.1 on Ruby 3, where keyword arguments are not forwarded and this causes an ArgumentError
  • Loading branch information
indirect authored and picandocodigo committed Sep 7, 2021
1 parent 8404aaa commit 224c0b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elasticsearch-model/lib/elasticsearch/model/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def initialize(target)

# Delegate methods to `@target`
#
def method_missing(method_name, *arguments, &block)
target.respond_to?(method_name) ? target.__send__(method_name, *arguments, &block) : super
def method_missing(method_name, *args, **kwargs, &block)
target.respond_to?(method_name) ? target.__send__(method_name, *args, **kwargs, &block) : super
end

# Respond to methods from `@target`
Expand Down

0 comments on commit 224c0b6

Please sign in to comment.