From 61f3572b91b7b91dfd85c9fb576b4088caf335d7 Mon Sep 17 00:00:00 2001 From: Ken Barber Date: Sun, 4 Dec 2011 16:57:26 +0000 Subject: (#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. --- templates/ntp.conf.debian.erb | 2 +- templates/ntp.conf.el.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/ntp.conf.debian.erb b/templates/ntp.conf.debian.erb index f51414f..77da814 100644 --- a/templates/ntp.conf.debian.erb +++ b/templates/ntp.conf.debian.erb @@ -20,7 +20,7 @@ filegen clockstats file clockstats type day enable # pool: # Managed by puppet class { "ntp": servers => [ ... ] } -<% servers_real.each do |server| -%> +<% [servers_real].flatten.each do |server| -%> server <%= server %> <% end -%> diff --git a/templates/ntp.conf.el.erb b/templates/ntp.conf.el.erb index db2aa9c..fc308cc 100644 --- a/templates/ntp.conf.el.erb +++ b/templates/ntp.conf.el.erb @@ -16,7 +16,7 @@ restrict -6 ::1 # Please consider joining the pool (http://www.pool.ntp.org/join.html). # Managed by puppet class { "ntp": servers => [ ... ] } -<% servers_real.each do |server| -%> +<% [servers_real].flatten.each do |server| -%> server <%= server %> <% end -%> -- cgit v1.2.3