From fc787d8cb850be83d50178a9c7db0122e1ad3980 Mon Sep 17 00:00:00 2001 From: Mike Voets Date: Tue, 21 Apr 2026 13:11:49 +0900 Subject: [PATCH] Replace deprecated MultiJson.encode/decode with dump/load MultiJson.encode and MultiJson.decode are deprecated aliases and scheduled for removal in MultiJson 2.0. Call the canonical MultiJson.dump and MultiJson.load methods so downstream users do not see deprecation warnings (which can escalate to errors when Ruby's warning handler is configured to raise, e.g. via Bugsnag). --- lib/fog/json.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fog/json.rb b/lib/fog/json.rb index 2fd54d1..1f9b849 100644 --- a/lib/fog/json.rb +++ b/lib/fog/json.rb @@ -31,13 +31,13 @@ def self.sanitize(data) # Do the MultiJson introspection at this level so we can define our encode/decode methods and # perform the introspection only once rather than once per call. def self.encode(obj) - MultiJson.encode(obj) + MultiJson.dump(obj) rescue => err raise EncodeError.slurp(err) end def self.decode(obj) - MultiJson.decode(obj) + MultiJson.load(obj) rescue => err raise DecodeError.slurp(err) end