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