Skip to content

Commit

Permalink
Ensure rubocop task runs on Ruby >= 3.1 (#149)
Browse files Browse the repository at this point in the history
We use an old version of rubocop (0.50.0) in order to support code
written for Ruby 1.9.3. This version of rubocop breaks on modern rubies
due to changes in the YAML API.

Installing the `safe_yaml` gem is a way to work around this. If rubocop
detects it, it will use the SafeYAML API instead of the one built into
Ruby.
  • Loading branch information
mattbrictson committed Aug 8, 2023
1 parent c7c66fb commit d3e4fdf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ if RUBY_VERSION >= "2.5"
end
end

# Needed to make rubocop 0.50.0 work on modern rubies
gem "safe_yaml" if RUBY_VERSION >= "3.1"

if (sshkit_version = ENV["sshkit"])
requirement = begin
Gem::Dependency.new("sshkit", sshkit_version).requirement
Expand Down

0 comments on commit d3e4fdf

Please sign in to comment.