summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-07-06 16:06:30 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-06 16:06:30 -0700
commit0598f35d6680e6f58f564c6da546ab307d0f3c3b (patch)
tree4d603ac0eb70f3a196a8c9c5a91c997d3a568310 /lib/puppet/parser
parent59718988af6c80451973c37e78c23cef7b171edc (diff)
downloadpuppet-0598f35d6680e6f58f564c6da546ab307d0f3c3b.tar.gz
puppet-0598f35d6680e6f58f564c6da546ab307d0f3c3b.tar.xz
puppet-0598f35d6680e6f58f564c6da546ab307d0f3c3b.zip
Fix for #4148 (2.6 is greater than 0.25.x)
We had a hardcoded assumption that the version number would always start with a zero, and thus were failing to recognise 2.6.0 as greater than 0.25.x
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/resource.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index fd2f49264..644170f60 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -141,7 +141,7 @@ class Puppet::Parser::Resource < Puppet::Resource
# Unless we're running >= 0.25, we're in compat mode.
def metaparam_compatibility_mode?
- ! (catalog and version = catalog.client_version and version = version.split(".") and version[0] == "0" and version[1].to_i >= 25)
+ ! (catalog and ver = (catalog.client_version||'0.0.0').split(".") and (ver[0] > "0" or ver[1].to_i >= 25))
end
def name