lib/dynamoid/adapter.rb in dynamoid-3.6.0 vs lib/dynamoid/adapter.rb in dynamoid-3.7.0

- old
+ new

@@ -156,11 +156,17 @@ # Delegate all methods that aren't defind here to the underlying adapter. # # @since 0.2.0 def method_missing(method, *args, &block) - return benchmark(method, *args) { adapter.send(method, *args, &block) } if adapter.respond_to?(method) + # Don't use keywork arguments delegating (with **kw). It works in + # different way in different Ruby versions: <= 2.6, 2.7, 3.0 and in some + # future 3.x versions. Providing that there are no downstream methods + # with keyword arguments in adapter. + # + # https://eregon.me/blog/2019/11/10/the-delegation-challenge-of-ruby27.html + return benchmark(method, *args) { adapter.send(method, *args, &block) } if adapter.respond_to?(method) super end # Query the DynamoDB table. This employs DynamoDB's indexes so is generally faster than scanning, but is # only really useful for range queries, since it can only find by one hash key at once. Only provide