1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use \A and \z to match whole string

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-04-07 13:26:12 +00:00
parent 873d62b1e2
commit fb979b4532

View file

@ -82,8 +82,7 @@ class ACL
# Creates a Regexp to match an address.
def dot_pat(str)
exp = "^" + dot_pat_str(str) + "$"
Regexp.new(exp)
/\A#{dot_pat_str(str)}\z/
end
public