Skip to content

Commit 82ca420

Browse files
committed
2024-07-21 v. 6.2.3.1: updated lcsp finder
1 parent cc98637 commit 82ca420

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lcsp/finder.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ def solution
2626
# @param {String[]} dirs
2727
def fill_directories(path, dirs)
2828
::Dir.foreach(path).reject { |name| name.start_with?('.') }.each do |entry|
29-
unless ::File.file?("#{path}/#{entry}")
30-
dirs << "#{path}/#{entry}"
31-
fill_directories("#{path}/#{entry}", dirs)
32-
end
29+
next if ::File.file?("#{path}/#{entry}")
30+
31+
dirs << "#{path}/#{entry}"
32+
33+
fill_directories("#{path}/#{entry}", dirs)
3334
end
3435
end
3536
end

leetcode-ruby.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require 'English'
55
::Gem::Specification.new do |s|
66
s.required_ruby_version = '>= 3.0'
77
s.name = 'leetcode-ruby'
8-
s.version = '6.2.3'
8+
s.version = '6.2.3.1'
99
s.license = 'MIT'
1010
s.files = ::Dir['lib/**/*.rb'] + %w[bin/leetcode-ruby README.md LICENSE]
1111
s.executable = 'leetcode-ruby'

0 commit comments

Comments
 (0)