Skip to content

Commit 35773e1

Browse files
committed
Fix Dataloader#with for JRuby
1 parent cd97340 commit 35773e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/graphql/dataloader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def cleanup_fiber
108108
# @param batch_parameters [Array<Object>]
109109
# @return [GraphQL::Dataloader::Source] An instance of {source_class}, initialized with `self, *batch_parameters`,
110110
# and cached for the lifetime of this {Multiplex}.
111-
if RUBY_VERSION < "3" || RUBY_ENGINE != "ruby" # truffle-ruby wasn't doing well with the implementation below
111+
if (RUBY_ENGINE == "ruby" && RUBY_ENGINE < "3") || RUBY_ENGINE == "truffleruby" # truffle-ruby wasn't doing well with the implementation below
112112
def with(source_class, *batch_args)
113113
batch_key = source_class.batch_key_for(*batch_args)
114114
@source_cache[source_class][batch_key] ||= begin

0 commit comments

Comments
 (0)