You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raisePuppet::ParseError,'convert_base(): First argument must be either a string or an integer'unlessargs[0].is_a?(Integer) || args[0].is_a?(String)
33
33
raisePuppet::ParseError,'convert_base(): Second argument must be either a string or an integer'unlessargs[1].is_a?(Integer) || args[1].is_a?(String)
34
34
35
-
ifargs[0].is_a?(String)
36
-
raisePuppet::ParseError,'convert_base(): First argument must be an integer or a string corresponding to an integer in base 10'unless%r{^[0-9]+$}.match?(args[0])
37
-
end
35
+
raisePuppet::ParseError,'convert_base(): First argument must be an integer or a string corresponding to an integer in base 10'ifargs[0].is_a?(String) && !%r{^[0-9]+$}.match?(args[0])
38
36
39
-
ifargs[1].is_a?(String)
40
-
raisePuppet::ParseError,'convert_base(): First argument must be an integer or a string corresponding to an integer in base 10'unless%r{^[0-9]+$}.match?(args[1])
41
-
end
37
+
raisePuppet::ParseError,'convert_base(): First argument must be an integer or a string corresponding to an integer in base 10'ifargs[1].is_a?(String) && !%r{^[0-9]+$}.match?(args[1])
Copy file name to clipboardExpand all lines: lib/puppet/type/file_line.rb
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -188,9 +188,7 @@ def retrieve
188
188
raise(Puppet::Error,'multiple must be true when replace_all_matches_not_matching_line is true')ifself[:replace_all_matches_not_matching_line].to_s == 'true' && self[:multiple].to_s == 'false'
189
189
raise(Puppet::Error,'replace must be true when replace_all_matches_not_matching_line is true')ifself[:replace_all_matches_not_matching_line].to_s == 'true' && self[:replace].to_s == 'false'
190
190
191
-
unlessself[:line]
192
-
raise(Puppet::Error,'line is a required attribute')unless(self[:ensure].to_s == 'absent') && (self[:match_for_absence].to_s == 'true') && self[:match]
193
-
end
191
+
raise(Puppet::Error,'line is a required attribute')if !self[:line] && !((self[:ensure].to_s == 'absent') && (self[:match_for_absence].to_s == 'true') && self[:match])
194
192
raise(Puppet::Error,'path is a required attribute')unlessself[:path]
0 commit comments