diff options
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/node.rb | 5 | ||||
-rw-r--r-- | lib/chef/node/attribute.rb | 2 | ||||
-rw-r--r-- | lib/chef/node/attribute_collections.rb | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb index b04e607624..0c13e5474a 100644 --- a/lib/chef/node.rb +++ b/lib/chef/node.rb @@ -1,9 +1,8 @@ -# # Author:: Adam Jacob (<adam@opscode.com>) # Author:: Christopher Brown (<cb@opscode.com>) # Author:: Christopher Walters (<cw@opscode.com>) # Author:: Tim Hinderliter (<tim@opscode.com>) -# Copyright:: Copyright (c) 2008-2011 Opscode, Inc. +# Copyright:: Copyright (c) 2008-2015 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -372,7 +371,7 @@ class Chef # Lazy initializer for tags attribute def tags - normal[:tags] = [] unless attribute?(:tags) + normal[:tags] = Array(normal[:tags]) normal[:tags] end diff --git a/lib/chef/node/attribute.rb b/lib/chef/node/attribute.rb index 45f2ef01ee..7ffac40bf4 100644 --- a/lib/chef/node/attribute.rb +++ b/lib/chef/node/attribute.rb @@ -1,7 +1,7 @@ #-- # Author:: Adam Jacob (<adam@opscode.com>) # Author:: AJ Christensen (<aj@opscode.com>) -# Copyright:: Copyright (c) 2008 Opscode, Inc. +# Copyright:: Copyright (c) 2008-2015 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/chef/node/attribute_collections.rb b/lib/chef/node/attribute_collections.rb index b912904534..1dcc950c6e 100644 --- a/lib/chef/node/attribute_collections.rb +++ b/lib/chef/node/attribute_collections.rb @@ -1,6 +1,6 @@ #-- # Author:: Daniel DeLeo (<dan@opscode.com>) -# Copyright:: Copyright (c) 2012 Opscode, Inc. +# Copyright:: Copyright (c) 2012-2015 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -148,7 +148,7 @@ class Chef def []=(key, value) root.top_level_breadcrumb ||= key - if set_unless? && key?(key) + if set_unless? && key?(key) && !self[key].nil? self[key] else root.reset_cache(root.top_level_breadcrumb) |