From 6af715b0dba0976b8082b3d0cb1747642e38ebc3 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sat, 25 Oct 2014 15:10:37 +0100 Subject: [PATCH] silence warnings about unescaped '-' in re char class Eliminate warnings like this: vagrant/plugins/hosts/linux/cap/nfs.rb:74: warning: character class has '-' without escape: /^# VAGRANT-BEGIN:( 1000)? ([\.\/A-Za-z0-9-_]+?)$/ --- plugins/hosts/linux/cap/nfs.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hosts/linux/cap/nfs.rb b/plugins/hosts/linux/cap/nfs.rb index c5435fff5..189800db4 100644 --- a/plugins/hosts/linux/cap/nfs.rb +++ b/plugins/hosts/linux/cap/nfs.rb @@ -71,7 +71,7 @@ module VagrantPlugins user = Process.uid File.read("/etc/exports").lines.each do |line| - if id = line[/^# VAGRANT-BEGIN:( #{user})? ([\.\/A-Za-z0-9-_]+?)$/, 2] + if id = line[/^# VAGRANT-BEGIN:( #{user})? ([\.\/A-Za-z0-9\-_]+?)$/, 2] if valid_ids.include?(id) logger.debug("Valid ID: #{id}") else