From 10fa19d80e2bd044621b9dc676b237802e1fa0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Tue, 26 Jul 2011 10:13:40 +0300 Subject: [PATCH] Fixed environment fact for Ruby 1.8.6 (no start_with method in string object). --- custom/lib/facter/environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/lib/facter/environment.rb b/custom/lib/facter/environment.rb index 45a3f76..77ef58d 100644 --- a/custom/lib/facter/environment.rb +++ b/custom/lib/facter/environment.rb @@ -1,5 +1,5 @@ ENV.each do |k,v| - next if not k.downcase.start_with?("puppet_") + next if not k.downcase =~ /^puppet_/ Facter.add("env_#{k.downcase}".to_sym) do setcode do v