Skip to content

Commit

Permalink
Remove the code for backward compatibility with Ruby 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ryz310 committed May 13, 2022
1 parent cdf750d commit 093522b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/rubocop_challenger/rubocop/yardoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,7 @@ def instance_methods
end

def source_file_path
if Object.respond_to?(:const_source_location)
Object.const_source_location(cop_class.name).first
else
instance_methods
.map { |m| cop_class.instance_method(m).source_location }
.compact
.map(&:first)
.first
end
Object.const_source_location(cop_class.name).first
end
end
end
Expand Down

0 comments on commit 093522b

Please sign in to comment.