Fix YAML loading on Ruby 3.1

This commit is contained in:
Essem 2023-03-07 12:46:45 -06:00
parent 67bb8ea535
commit acf81e56d0
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -0,0 +1,9 @@
# Ruby 3.1 includes a breaking update to Psych 4.
# Undo the breakage, as Mastodon doesn't load untrusted YAML files.
# https://stackoverflow.com/a/71192990
module YAML
class << self
alias_method :load, :unsafe_load if YAML.respond_to? :unsafe_load
end
end