summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-01-03 23:35:07 -0700
committerDan Allen <dan.j.allen@gmail.com>2022-01-03 23:35:07 -0700
commit95818f7685aa4dbf22992fdf37390e19d3c8c8a7 (patch)
treed04796d5200d3db98b3ac8aa3f6a409d83d1b190 /lib
parent4d849f85a7e2684c0553c8d9082c5b82ead2cfbc (diff)
use keep_if instead of select when subject is dynamic
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/converter/template.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asciidoctor/converter/template.rb b/lib/asciidoctor/converter/template.rb
index 8eea83cf..5b27155f 100644
--- a/lib/asciidoctor/converter/template.rb
+++ b/lib/asciidoctor/converter/template.rb
@@ -197,7 +197,7 @@ class Converter::TemplateConverter < Converter::Base
def scan_dir template_dir, pattern, template_cache = nil
result, helpers = {}, nil
# Grab the files in the top level of the directory (do not recurse)
- (::Dir.glob pattern).select {|match| ::File.file? match }.each do |file|
+ (::Dir.glob pattern).keep_if {|match| ::File.file? match }.each do |file|
if (basename = ::File.basename file) == 'helpers.rb'
helpers = file
next