missing parenthesis added in filter.rb (net-ldap)

git-svn-id: http://redmine.rubyforge.org/svn/trunk@252 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-02-18 11:45:55 +00:00
parent 5a241fd12e
commit 4564519a56
1 changed files with 7 additions and 7 deletions

View File

@ -307,8 +307,8 @@ class FilterParser #:nodoc:
end end
def parse_paren_expression scanner def parse_paren_expression scanner
if scanner.scan /\s*\(\s*/ if scanner.scan(/\s*\(\s*/)
b = if scanner.scan /\s*\&\s*/ b = if scanner.scan(/\s*\&\s*/)
a = nil a = nil
branches = [] branches = []
while br = parse_paren_expression(scanner) while br = parse_paren_expression(scanner)
@ -321,7 +321,7 @@ class FilterParser #:nodoc:
end end
a a
end end
elsif scanner.scan /\s*\|\s*/ elsif scanner.scan(/\s*\|\s*/)
# TODO: DRY! # TODO: DRY!
a = nil a = nil
branches = [] branches = []
@ -335,7 +335,7 @@ class FilterParser #:nodoc:
end end
a a
end end
elsif scanner.scan /\s*\!\s*/ elsif scanner.scan(/\s*\!\s*/)
br = parse_paren_expression(scanner) br = parse_paren_expression(scanner)
if br if br
~ br ~ br
@ -353,11 +353,11 @@ class FilterParser #:nodoc:
# Added a greatly-augmented filter contributed by Andre Nathan # Added a greatly-augmented filter contributed by Andre Nathan
# for detecting special characters in values. (15Aug06) # for detecting special characters in values. (15Aug06)
def parse_filter_branch scanner def parse_filter_branch scanner
scanner.scan /\s*/ scanner.scan(/\s*/)
if token = scanner.scan( /[\w\-_]+/ ) if token = scanner.scan( /[\w\-_]+/ )
scanner.scan /\s*/ scanner.scan(/\s*/)
if op = scanner.scan( /\=|\<\=|\<|\>\=|\>|\!\=/ ) if op = scanner.scan( /\=|\<\=|\<|\>\=|\>|\!\=/ )
scanner.scan /\s*/ scanner.scan(/\s*/)
#if value = scanner.scan( /[\w\*\.]+/ ) (ORG) #if value = scanner.scan( /[\w\*\.]+/ ) (ORG)
if value = scanner.scan( /[\w\*\.\+\-@=#\$%&!]+/ ) if value = scanner.scan( /[\w\*\.\+\-@=#\$%&!]+/ )
case op case op