lib/gitlab_exporter/cli.rb in gitlab-exporter-13.2.0 vs lib/gitlab_exporter/cli.rb in gitlab-exporter-13.3.0
- old
+ new
@@ -1,20 +1,6 @@
require "yaml"
-# TODO: Remove this once we're on Ruby 3
-# https://gitlab.com/gitlab-org/gitlab/-/issues/393651
-unless YAML.respond_to?(:safe_load_file)
- module YAML # rubocop:disable Style/Documentation
- # Temporary Ruby 2 back-compat workaround.
- #
- # This method only exists as of stdlib 3.0.0:
- # https://ruby-doc.org/stdlib-3.0.0/libdoc/psych/rdoc/Psych.html
- def self.safe_load_file(path, **options)
- YAML.safe_load(File.read(path), **options)
- end
- end
-end
-
module GitLab
module Exporter
# Stores runner classes in a single place
#
# The entry point is the module method "for" which takes the name of a runner.