Skip to content

Commit 63658c2

Browse files
committed
fix
1 parent c48ee8e commit 63658c2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/redis_client/cluster/errors.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def with_config(config)
1212
end
1313

1414
ERR_ARG_NORMALIZATION = ->(arg) { Array[arg].flatten.reject { |e| e.nil? || (e.respond_to?(:empty?) && e.empty?) } }
15+
Ractor.make_shareable(ERR_ARG_NORMALIZATION) if Object.const_defined?(:Ractor, false) && Ractor.respond_to?(:make_shareable)
1516

1617
private_constant :ERR_ARG_NORMALIZATION
1718

lib/redis_client/cluster/router.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Cluster
1717
class Router
1818
ZERO_CURSOR_FOR_SCAN = '0'
1919
TSF = ->(f, x) { f.nil? ? x : f.call(x) }.curry
20+
Ractor.make_shareable(TSF) if Object.const_defined?(:Ractor, false) && Ractor.respond_to?(:make_shareable)
2021
DEDICATED_ACTIONS = lambda do # rubocop:disable Metrics/BlockLength
2122
action = Struct.new('RedisCommandRoutingAction', :method_name, :reply_transformer, keyword_init: true)
2223
pick_first = ->(reply) { reply.first } # rubocop:disable Style/SymbolProc

0 commit comments

Comments
 (0)