Skip to content

Commit

Permalink
Remove a redundant condition
Browse files Browse the repository at this point in the history
Follow #10644.

It's a redundant condition because Ruby 2.2- is not supported as a runtime version.
Recovered with #10644 is an analysis version.
  • Loading branch information
koic committed Nov 30, 2022
1 parent b347bb7 commit 297c1d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def to_supported_styles(enforced_style)
private

def compatible_external_encoding_for?(src)
src = src.dup if RUBY_VERSION < '2.3' || RUBY_ENGINE == 'jruby'
src = src.dup if RUBY_ENGINE == 'jruby'
src.force_encoding(Encoding.default_external).valid_encoding?
end
end
Expand Down

0 comments on commit 297c1d4

Please sign in to comment.