summaryrefslogtreecommitdiff
path: root/lib/chef/node.rb
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2015-11-12 10:07:30 +0000
committerThom May <thom@may.lt>2015-11-12 10:07:30 +0000
commitf4a47f9e248d99fe6c284bcbff7c2b05d6dd0484 (patch)
tree0775ce6882d47f093201a57f49ee65fde6941e25 /lib/chef/node.rb
parentb0dbe243d469cc36477ba8102b74a8456b6f276d (diff)
parentaf7379d0beeceacf0c7806ac1811a472dbc15a3b (diff)
downloadchef-f4a47f9e248d99fe6c284bcbff7c2b05d6dd0484.tar.gz
Merge pull request #4064 from josb/master
Use the initializer to avoid NoMethodError on nil.include?
Diffstat (limited to 'lib/chef/node.rb')
-rw-r--r--lib/chef/node.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb
index 83ec7e2550..b04e607624 100644
--- a/lib/chef/node.rb
+++ b/lib/chef/node.rb
@@ -376,12 +376,12 @@ class Chef
normal[:tags]
end
- def tag(*tags)
- tags.each do |tag|
- self.normal[:tags].push(tag.to_s) unless self[:tags].include? tag.to_s
+ def tag(*args)
+ args.each do |tag|
+ tags.push(tag.to_s) unless tags.include? tag.to_s
end
- self[:tags]
+ tags
end
# Extracts the run list from +attrs+ and applies it. Returns the remaining attributes