Skip to content

Commit

Permalink
Use defined? instead of Psych::VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed May 20, 2021
1 parent d54855f commit 810800f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/rubocop/cli/options_spec.rb
Expand Up @@ -1024,7 +1024,7 @@ def on_send(node)
shared_examples('prints config') do
it 'prints the current configuration' do
out = stdout.lines.to_a
printed_config = if Psych::VERSION >= '4.0.0' # RUBY_VERSION >= '3.1.0'
printed_config = if defined?(YAML.unsafe_load) # RUBY_VERSION >= '3.1.0'
YAML.unsafe_load(out.join)
else
YAML.load(out.join) # rubocop:disable Security/YAMLLoad
Expand Down

0 comments on commit 810800f

Please sign in to comment.