diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-06-11 15:02:42 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-06-11 15:32:53 -0700 |
commit | 5825eea4b139b9af089c3075d042d5d3160583ec (patch) | |
tree | fd79641ded1857ee4166b6e9ba774a35ab47b06b /Gemfile | |
parent | 3889eddfc9944b23caea412d05c08b9b156cb50f (diff) | |
download | chef-5825eea4b139b9af089c3075d042d5d3160583ec.tar.gz |
Use .match? not =~ when match values aren't necessary
Autocorrected from RuboCop Performance which is now smart enough to detect when you use the match and when you don't. Using match? does not create any objects so it's slightly faster and uses less memory.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'Gemfile')
-rw-r--r-- | Gemfile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -84,7 +84,7 @@ eval_gemfile("./Gemfile.local") if File.exist?("./Gemfile.local") # # We copy (and overwrite) these files every time "bundle <exec|install>" is # executed, just in case they have changed. -if RUBY_PLATFORM =~ /mswin|mingw|windows/ +if RUBY_PLATFORM.match?(/mswin|mingw|windows/) instance_eval do ruby_exe_dir = RbConfig::CONFIG["bindir"] assemblies = Dir.glob(File.expand_path("distro/ruby_bin_folder", Dir.pwd) + "/*.dll") |