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:
parent
873d62b1e2
commit
fb979b4532
1 changed files with 1 additions and 2 deletions
|
@ -82,8 +82,7 @@ class ACL
|
||||||
# Creates a Regexp to match an address.
|
# Creates a Regexp to match an address.
|
||||||
|
|
||||||
def dot_pat(str)
|
def dot_pat(str)
|
||||||
exp = "^" + dot_pat_str(str) + "$"
|
/\A#{dot_pat_str(str)}\z/
|
||||||
Regexp.new(exp)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
public
|
public
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue