[ruby-core:126375] [Ruby Bug#22241] Restore compatibility for removed `JSON.dump` and `JSON.parse` arguments