diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-05 11:44:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-05 12:41:14 -0700 |
commit | 7bf98ad06b30b7feb4ea3fbbe45a5b733467a5d3 (patch) | |
tree | b0995ded1a63654d3f54140bd880c69f86afd52f /lib/chef/provider/mount/aix.rb | |
parent | 9802d7c075c8b7dae42dbcecd92d492f7fa128ac (diff) | |
download | chef-7bf98ad06b30b7feb4ea3fbbe45a5b733467a5d3.tar.gz |
Style/RegexpLiteral
given how many regexps we have with /'s in the match this seems like
a very good one.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/mount/aix.rb')
-rw-r--r-- | lib/chef/provider/mount/aix.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/mount/aix.rb b/lib/chef/provider/mount/aix.rb index ca6ca4bd63..0a5e30447b 100644 --- a/lib/chef/provider/mount/aix.rb +++ b/lib/chef/provider/mount/aix.rb @@ -110,7 +110,7 @@ class Chef when /#{search_device}\s+#{Regexp.escape(@new_resource.mount_point)}/ mounted = true logger.trace("Special device #{device_logstring} mounted as #{@new_resource.mount_point}") - when /^[\/\w]+\s+#{Regexp.escape(@new_resource.mount_point)}\s+/ + when %r{^[/\w]+\s+#{Regexp.escape(@new_resource.mount_point)}\s+} mounted = false logger.trace("Found conflicting mount point #{@new_resource.mount_point} in /etc/fstab") end @@ -196,7 +196,7 @@ class Chef found_device = false ::File.open("/etc/filesystems", "r").each_line do |line| case line - when /^\/.+:\s*$/ + when %r{^/.+:\s*$} if line =~ /#{Regexp.escape(@new_resource.mount_point)}+:/ found_device = true else |