lib/active_graph/node/has_n.rb in activegraph-11.3.0 vs lib/active_graph/node/has_n.rb in activegraph-11.3.1

- old
+ new

@@ -153,17 +153,21 @@ end end CACHED_RESULT_METHODS = [] - def method_missing(method_name, *args, &block) + def method_missing(method_name, *args, **kwargs, &block) target = target_for_missing_method(method_name) super if target.nil? cache_query_proxy_result if !cached? && !target.is_a?(ActiveGraph::Node::Query::QueryProxy) clear_cache_result if target.is_a?(ActiveGraph::Node::Query::QueryProxy) - target.public_send(method_name, *args, &block) + if RUBY_VERSION < '3' && kwargs.empty? + target.public_send(method_name, *args, &block) + else + target.public_send(method_name, *args, **kwargs, &block) + end end def serializable_hash(options = {}) to_a.map { |record| record.serializable_hash(options) } end