summaryrefslogtreecommitdiff
path: root/lib/chef/environment.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-26 11:51:28 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-26 11:51:28 -0700
commit8837ebfda2a4292976d44ec564f349f357349fc1 (patch)
tree765d2e98a4c0bead2030f411f07613207e5070b5 /lib/chef/environment.rb
parent4d13c5acaa8596eab50b7d62252a6d94ab290d61 (diff)
downloadchef-simplify_regex.tar.gz
Simplify some regexes by removing redundant character classessimplify_regex
New RuboCop here. There's no need for character classes when all we have is a single character. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/environment.rb')
-rw-r--r--lib/chef/environment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb
index d6a2215423..e651e1b4aa 100644
--- a/lib/chef/environment.rb
+++ b/lib/chef/environment.rb
@@ -35,7 +35,7 @@ class Chef
include Chef::Mixin::ParamsValidate
include Chef::Mixin::FromFile
- COMBINED_COOKBOOK_CONSTRAINT = /(.+)(?:[\s]+)((?:#{Chef::VersionConstraint::OPS.join('|')})(?:[\s]+).+)$/.freeze
+ COMBINED_COOKBOOK_CONSTRAINT = /(.+)(?:\s+)((?:#{Chef::VersionConstraint::OPS.join('|')})(?:\s+).+)$/.freeze
def initialize(chef_server_rest: nil)
@name = ""