diff options
author | ballman <ballman@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-06-13 20:19:38 +0000 |
---|---|---|
committer | ballman <ballman@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-06-13 20:19:38 +0000 |
commit | cb5bccc8bb6099ef7800837486638c1ce547cff3 (patch) | |
tree | cc0d394b075410c121901f202709f07f650a6cd8 /lib/puppet/parser/resource/param.rb | |
parent | d78a7a523a7128a877bd1fd615d18b7c739ea0a8 (diff) | |
download | puppet-cb5bccc8bb6099ef7800837486638c1ce547cff3.tar.gz puppet-cb5bccc8bb6099ef7800837486638c1ce547cff3.tar.xz puppet-cb5bccc8bb6099ef7800837486638c1ce547cff3.zip |
Added to_s to the values to ensure the check versus the database will be
consistent and booleans and references will check correctly.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2572 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/resource/param.rb')
-rw-r--r-- | lib/puppet/parser/resource/param.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/parser/resource/param.rb b/lib/puppet/parser/resource/param.rb index 34c260a44..f7fbd01b9 100644 --- a/lib/puppet/parser/resource/param.rb +++ b/lib/puppet/parser/resource/param.rb @@ -28,7 +28,7 @@ class Puppet::Parser::Resource::Param line_number = line_to_i() return values.collect do |v| - db_resource.param_values.create(:value => v, + db_resource.param_values.create(:value => v.to_s, :line => line_number, :param_name => param_name) end @@ -44,7 +44,7 @@ class Puppet::Parser::Resource::Param values_to_add(db_values).each { |add_me| db_resource = db_values[0].resource db_param_name = db_values[0].param_name - db_resource.param_values.create(:value => add_me, + db_resource.param_values.create(:value => add_me.to_s, :line => line_number, :param_name => db_param_name) } @@ -59,7 +59,7 @@ class Puppet::Parser::Resource::Param line_number = line_to_i() db_values.collect do |db| db unless (db.line == line_number && - values.find { |v| v == db.value } ) + values.find { |v| v.to_s == db.value } ) end.compact end @@ -67,7 +67,7 @@ class Puppet::Parser::Resource::Param values = value.is_a?(Array) ? value : [value] line_number = line_to_i() values.collect do |v| - v unless db_values.find { |db| (v == db.value && + v unless db_values.find { |db| (v.to_s == db.value && line_number == db.line) } end.compact end |