From 2220810c4ad8ea22b2cdc58bc0b9c7392a388b01 Mon Sep 17 00:00:00 2001 From: Alexander Fisher Date: Sun, 14 May 2017 14:16:28 +0100 Subject: Fix filenames of two function spec tests The tests weren't being run. Total tests increase from 2742 to 2769. Also fix 'when using a class extending String' test. It had been failing with... ``` RuntimeError: can't modify frozen AlsoString ``` --- lib/puppet/functions/length.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/functions/length.rb b/lib/puppet/functions/length.rb index 86e735c..5ebd455 100644 --- a/lib/puppet/functions/length.rb +++ b/lib/puppet/functions/length.rb @@ -3,7 +3,7 @@ Puppet::Functions.create_function(:length) do dispatch :length do param 'Variant[String,Array,Hash]', :value end - def length(value) + def length(value) if value.is_a?(String) result = value.length elsif value.is_a?(Array) || value.is_a?(Hash) -- cgit v1.2.3