Skip to content

Add monkey patch for YAML.safe_load_file for MailRoom in Ruby 2.7

Stan Hu requested to merge sh-fix-mailroom-spec-ruby-2.7 into master

What does this MR do and why?

!117027 (merged) used YAML.safe_load_file, but this method is not available in Ruby 2.7.

!113358 (merged) added a temporary monkey patch that makes this available for Ruby 2.7, but since lib/gitlab/mail_room.rb is loaded independently of the Rails process it does not load the initializer.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports