Skip to content

Commit 33d99b4

Browse files
committed
fix(scan): use Ruby 2.6 compatible code instead of filter_map
filter_map was introduced in Ruby 2.7, but vtk supports Ruby 2.5+. Use select + values instead.
1 parent 05a1f80 commit 33d99b4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/vtk/commands/scan/repo.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def run_script(script_path)
5454
end
5555

5656
def script_options
57-
flags = OPTION_FLAGS.filter_map { |key, flag| flag if options[key] }
57+
# Use select + map instead of filter_map for Ruby 2.6 compatibility
58+
flags = OPTION_FLAGS.select { |key, _flag| options[key] }.values
5859
flags << "--depth=#{options[:depth]}" if options[:depth]
5960
flags
6061
end

0 commit comments

Comments
 (0)