summaryrefslogtreecommitdiffstats
path: root/scripts/build
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-09-23 20:18:38 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-09-23 20:18:38 +0200
commitd9ec600545a581da2d248bc60fce5b5f8dcdab8d (patch)
treea0c8764bbcf9dfdda031391a360b60e62973b20b /scripts/build
parent33f0964d53270e627e9293a3a7a2badb44353a0b (diff)
downloadvim-polyglot-d9ec600545a581da2d248bc60fce5b5f8dcdab8d.tar.gz
vim-polyglot-d9ec600545a581da2d248bc60fce5b5f8dcdab8d.zip
Allow to use ruby 2.5.5, closes #558
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/build b/scripts/build
index 44b03e95..8b507fef 100755
--- a/scripts/build
+++ b/scripts/build
@@ -290,7 +290,7 @@ def rule_to_code(rule)
if rule.has_key?("rules")
return rule["rules"].map do |r|
- indent(rule_to_code({ "extensions" => rule["extensions"], **r }), 0)
+ indent(rule_to_code({ "extensions" => rule["extensions"] }.merge(r)), 0)
end.join("\n")
end
@@ -508,7 +508,7 @@ def generate_ftdetect(packages, heuristics)
for filename in filenames.sort
if filename[0] == "."
- filename = "{.,}" + filename[1..]
+ filename = "{.,}" + filename[1..-1]
end
if filename[-1] == "*"
autocommands << " au BufNewFile,BufRead #{filename} call s:StarSetf('#{name}')\n"
@@ -729,7 +729,7 @@ def detect_filetypes(glob)
end.group_by { |a, b| a }.map { |a, b| [a, b.map { |c, d| d }] }.map { |a, b|
{
"name" => a,
- "extensions" => b.select { |x| x.match(/^\*\.[^\/]+$/) }.map { |a| a.strip[2..] },
+ "extensions" => b.select { |x| x.match(/^\*\.[^\/]+$/) }.map { |a| a.strip[2..-1] },
"filenames" => expand_all(b.select { |x| !x.match(/^\*\.[^\/]+$/) })
}
}