From 65e99f5eb6a6280f7cc84354729854f9bb5ea2f1 Mon Sep 17 00:00:00 2001 From: Francis Bogsanyi Date: Thu, 2 Nov 2023 10:02:58 -0400 Subject: [PATCH] fix: Ruby 3.0 compatibility for generate_r --- .../sdk/trace/samplers/consistent_probability_tracestate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_experimental/lib/opentelemetry/sdk/trace/samplers/consistent_probability_tracestate.rb b/sdk_experimental/lib/opentelemetry/sdk/trace/samplers/consistent_probability_tracestate.rb index c008f4e6c8..2078866639 100644 --- a/sdk_experimental/lib/opentelemetry/sdk/trace/samplers/consistent_probability_tracestate.rb +++ b/sdk_experimental/lib/opentelemetry/sdk/trace/samplers/consistent_probability_tracestate.rb @@ -106,7 +106,7 @@ def decimal(str) end def generate_r(trace_id) - x = trace_id.unpack1('Q>', offset: 8) | 0x3 + x = trace_id.unpack1('@8Q>') | 0x3 64 - x.bit_length end end