We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad57272 commit 1321d58Copy full SHA for 1321d58
lib/puppet/parser/functions/is_domain_name.rb
@@ -13,7 +13,7 @@ module Puppet::Parser::Functions
13
"given #{arguments.size} for 1")
14
end
15
16
- domain = arguments[0]
+ domain = arguments[0].dup
17
18
# Limits (rfc1035, 3.1)
19
domain_max_length=255
spec/functions/is_domain_name_spec.rb
@@ -61,4 +61,11 @@
61
result = scope.function_is_domain_name(["not valid"])
62
expect(result).to(be_falsey)
63
64
+
65
+ # Values obtained from Facter values will be frozen strings
66
+ # in newer versions of Facter:
67
+ it "should not throw an exception if passed a frozen string" do
68
+ result = scope.function_is_domain_name(["my.domain.name".freeze])
69
+ expect(result).to(be_truthy)
70
+ end
71
0 commit comments