From d42aafd7a8c6b1b97dd79586114f07f97cde999f Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Sun, 1 Jan 2012 15:29:09 -0500 Subject: changed the matches regexp to be not greedy so other things like tables and columns can be matched --- lib/puppet/provider/mysql_grant/mysql.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/puppet/provider/mysql_grant') diff --git a/lib/puppet/provider/mysql_grant/mysql.rb b/lib/puppet/provider/mysql_grant/mysql.rb index 22ee1e7..f3c800d 100644 --- a/lib/puppet/provider/mysql_grant/mysql.rb +++ b/lib/puppet/provider/mysql_grant/mysql.rb @@ -39,7 +39,8 @@ Puppet::Type.type(:mysql_grant).provide(:mysql) do # this parses the def split_name(string) - matches = /^([^@]*)@([^\/]*)(\/(.*))?(\/(.*))?(\/(.*))?$/.match(string).captures.compact + matches = /^([^@]*)@([^\/]*)(\/([^\/]*))?(\/([^\/]*))?$/.match(string).captures.compact + case matches.length when 2 { -- cgit v1.2.3