diff --git a/lcsp/finder.rb b/lcsp/finder.rb index 51225dbb..c679efb8 100644 --- a/lcsp/finder.rb +++ b/lcsp/finder.rb @@ -26,10 +26,11 @@ def solution # @param {String[]} dirs def fill_directories(path, dirs) ::Dir.foreach(path).reject { |name| name.start_with?('.') }.each do |entry| - unless ::File.file?("#{path}/#{entry}") - dirs << "#{path}/#{entry}" - fill_directories("#{path}/#{entry}", dirs) - end + next if ::File.file?("#{path}/#{entry}") + + dirs << "#{path}/#{entry}" + + fill_directories("#{path}/#{entry}", dirs) end end end diff --git a/leetcode-ruby.gemspec b/leetcode-ruby.gemspec index 282232ae..fd3aecd1 100644 --- a/leetcode-ruby.gemspec +++ b/leetcode-ruby.gemspec @@ -5,7 +5,7 @@ require 'English' ::Gem::Specification.new do |s| s.required_ruby_version = '>= 3.0' s.name = 'leetcode-ruby' - s.version = '6.2.3' + s.version = '6.2.3.1' s.license = 'MIT' s.files = ::Dir['lib/**/*.rb'] + %w[bin/leetcode-ruby README.md LICENSE] s.executable = 'leetcode-ruby'