lib/opentelemetry/common/propagation/rack_env_getter.rb in opentelemetry-common-0.20.0 vs lib/opentelemetry/common/propagation/rack_env_getter.rb in opentelemetry-common-0.20.1
- old
+ new
@@ -27,10 +27,11 @@
end
private
def to_rack_key(key)
- ret = "HTTP_#{key}"
+ # Use + for mutable string interpolation in pre-Ruby 3.0.
+ ret = +"HTTP_#{key}"
ret.tr!('-', '_')
ret.upcase!
ret
end