From f9ffca636f7ebd900c3a095e1afba16527100d64 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Thu, 5 Jan 2023 11:48:19 +0900 Subject: [PATCH] Rubocop auto correct --- lib/youplot/parser.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/youplot/parser.rb b/lib/youplot/parser.rb index 2e8eb04..128c982 100644 --- a/lib/youplot/parser.rb +++ b/lib/youplot/parser.rb @@ -50,11 +50,11 @@ module YouPlot def find_config_file config_file_candidate_paths.each do |file| path = File.expand_path(file) - if File.exist?(path) - @config_file = path - ENV['MYYOUPLOTRC'] = path - return @config_file - end + next unless File.exist?(path) + + @config_file = path + ENV['MYYOUPLOTRC'] = path + return @config_file end nil end