Skip to content

Commit

Permalink
Merge pull request #9806 from koic/fix_build_error_for_ruby_3_1_0
Browse files Browse the repository at this point in the history
Fix a build error for Ruby 3.1.0-dev
  • Loading branch information
koic committed May 17, 2021
2 parents 4d183d3 + 521cedf commit 5f64524
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/rubocop/cli/options_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,11 @@ def on_send(node)
shared_examples('prints config') do
it 'prints the current configuration' do
out = stdout.lines.to_a
printed_config = YAML.load(out.join) # rubocop:disable Security/YAMLLoad
printed_config = if Psych::VERSION >= '4.0.0' # RUBY_VERSION >= '3.1.0'
YAML.unsafe_load(out.join)
else
YAML.load(out.join) # rubocop:disable Security/YAMLLoad
end
cop_names = (arguments[0] || '').split(',')
cop_names.each do |cop_name|
global_conf[cop_name].each do |key, value|
Expand Down

0 comments on commit 5f64524

Please sign in to comment.