@@ -1390,17 +1390,17 @@ def insync?(is)
13901390 should_negate = '!'
13911391 end
13921392
1393- # If 'should' contains anything other than digits,
1393+ # If 'should' contains anything other than digits or digit range ,
13941394 # we assume that we have to do a lookup to convert
13951395 # to UID
1396- unless should [ %r{[0-9]+} ] == should
1396+ unless should [ %r{[0-9]+(-[0-9]+)? } ] == should
13971397 should = Etc . getpwnam ( should ) . uid
13981398 end
13991399
1400- # If 'is' contains anything other than digits,
1400+ # If 'is' contains anything other than digits or digit range ,
14011401 # we assume that we have to do a lookup to convert
14021402 # to UID
1403- unless is [ %r{[0-9]+} ] == is
1403+ unless is [ %r{[0-9]+(-[0-9]+)? } ] == is
14041404 is = Etc . getpwnam ( is ) . uid
14051405 end
14061406
@@ -1439,17 +1439,17 @@ def insync?(is)
14391439 should_negate = '!'
14401440 end
14411441
1442- # If 'should' contains anything other than digits,
1442+ # If 'should' contains anything other than digits or digit range ,
14431443 # we assume that we have to do a lookup to convert
1444- # to UID
1445- unless should [ %r{[0-9]+} ] == should
1444+ # to GID
1445+ unless should [ %r{[0-9]+(-[0-9]+)? } ] == should
14461446 should = Etc . getgrnam ( should ) . gid
14471447 end
14481448
1449- # If 'is' contains anything other than digits,
1449+ # If 'is' contains anything other than digits or digit range ,
14501450 # we assume that we have to do a lookup to convert
1451- # to UID
1452- unless is [ %r{[0-9]+} ] == is
1451+ # to GID
1452+ unless is [ %r{[0-9]+(-[0-9]+)? } ] == is
14531453 is = Etc . getgrnam ( is ) . gid
14541454 end
14551455
0 commit comments