Fixing Ruby 1.9.2 -wW2 warnings (bug #28588)
[#28588] Regexp warning under Ruby 1.9.2-p0.
This commit is contained in:
parent
75bec76435
commit
3b0a8223b0
|
@ -533,7 +533,7 @@ class Net::LDAP::Filter
|
|||
when :ex
|
||||
seq = []
|
||||
|
||||
unless @left =~ /^([-;\d\w]*)(:dn)?(:(\w+|[.\d\w]+))?$/
|
||||
unless @left =~ /^([-;\w]*)(:dn)?(:(\w+|[.\w]+))?$/
|
||||
raise Net::LDAP::LdapError, "Bad attribute #{@left}"
|
||||
end
|
||||
type, dn, rule = $1, $2, $4
|
||||
|
@ -751,7 +751,7 @@ class Net::LDAP::Filter
|
|||
# This parses a given expression inside of parentheses.
|
||||
def parse_filter_branch(scanner)
|
||||
scanner.scan(/\s*/)
|
||||
if token = scanner.scan(/[-\w\d_:.]*[\d\w]/)
|
||||
if token = scanner.scan(/[-\w:.]*[\w]/)
|
||||
scanner.scan(/\s*/)
|
||||
if op = scanner.scan(/<=|>=|!=|:=|=/)
|
||||
scanner.scan(/\s*/)
|
||||
|
|
Loading…
Reference in a new issue