Skip to content

Commit 61f3572

Browse files
committed
(#11155) Fix templates so they are ruby-1.9.2 compatible
The templates had #each methods being called on strings which is not ruby-1.9.2 compatible. Instead, I've converted the string to an array using a pattern that is still compatible if an array is passed.
1 parent 7d0a1e5 commit 61f3572

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/ntp.conf.debian.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ filegen clockstats file clockstats type day enable
2020
# pool: <http://www.pool.ntp.org/join.html>
2121

2222
# Managed by puppet class { "ntp": servers => [ ... ] }
23-
<% servers_real.each do |server| -%>
23+
<% [servers_real].flatten.each do |server| -%>
2424
server <%= server %>
2525
<% end -%>
2626

templates/ntp.conf.el.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ restrict -6 ::1
1616
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
1717

1818
# Managed by puppet class { "ntp": servers => [ ... ] }
19-
<% servers_real.each do |server| -%>
19+
<% [servers_real].flatten.each do |server| -%>
2020
server <%= server %>
2121
<% end -%>
2222

0 commit comments

Comments
 (0)