Fix JSON: Denial of Service or Information Disclosure via format string injection
Patch created by cherry-picking 393b41c3e5\#diff-128577053eab7333382a3f656b2a2e3eb136be8eda67c5b6d656b9b3d7c15982R406
within ruby-v4.0.3 branch.
Advisory: https://github.com/ruby/json/security/advisories/GHSA-3m6g-2423-7cp3
Resolves: RHEL-169964