From edfc97d82ffd01ef986d79b38273f10b126e4fee Mon Sep 17 00:00:00 2001 From: matmorel Date: Tue, 2 May 2023 10:13:40 +0200 Subject: [PATCH] refactor: simply replace usage of `File.exists?` by `File.exist?` --- lib/sord/resolver.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/sord/resolver.rb b/lib/sord/resolver.rb index 520e921..5e42f56 100644 --- a/lib/sord/resolver.rb +++ b/lib/sord/resolver.rb @@ -30,10 +30,9 @@ def self.load_gem_objects(hash) end add_rbs_objects_to_paths(all_decls, hash) - file_exist = RUBY_VERSION[0].to_i > 2 ? :exist? : :exists? gem_paths = Bundler.load.specs.map(&:full_gem_path) gem_paths.each do |path| - next unless File.method(file_exist).call("#{path}/rbi") + next unless File.exist?("#{path}/rbi") Dir["#{path}/rbi/**/*.rbi"].each do |sigfile| tree = Parlour::TypeLoader.load_file(sigfile)