summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb')
-rw-r--r--lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb b/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb
index 3b1fb53da6..62fe34ece3 100644
--- a/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb
+++ b/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb
@@ -55,7 +55,7 @@ class Chef
base_name = remove_dot_json(entry.name)
if object["raw_data"]["id"] != base_name
yield("ID in #{entry.path_for_printing} must be '#{base_name}' (is '#{object['raw_data']['id']}')")
- elsif entry.parent.name =~ RESERVED_NAMES
+ elsif entry.parent.name.match?(RESERVED_NAMES)
yield("Data bag name ('#{entry.parent.name}') must not match #{RESERVED_NAMES.inspect}")
end
end