lib/opentelemetry/context/propagation/rack_env_getter.rb in opentelemetry-api-1.2.1 vs lib/opentelemetry/context/propagation/rack_env_getter.rb in opentelemetry-api-1.2.2
- old
+ new
@@ -30,10 +30,11 @@
end
private
def to_rack_key(key)
- ret = 'HTTP_' + key # rubocop:disable Style/StringConcatenation
+ # Use + for mutable string interpolation in pre-Ruby 3.0.
+ ret = +"HTTP_#{key}"
ret.tr!('-', '_')
ret.upcase!
ret
end