Enabled the left side of a filter-specification to be a Symbol.

Previously it had to be a String.
This commit is contained in:
blackhedd 2006-05-04 12:06:34 +00:00
parent c30a198a29
commit 271c685a67

View file

@ -180,7 +180,7 @@ class Filter
case @op case @op
when :eq when :eq
if @right == "*" # present if @right == "*" # present
@left.to_ber_contextspecific 7 @left.to_s.to_ber_contextspecific 7
elsif @right =~ /[\*]/ #substring elsif @right =~ /[\*]/ #substring
ary = @right.split( /[\*]+/ ) ary = @right.split( /[\*]+/ )
final_star = @right =~ /[\*]$/ final_star = @right =~ /[\*]$/
@ -198,9 +198,9 @@ class Filter
unless final_star unless final_star
seq << ary.shift.to_ber_contextspecific(2) seq << ary.shift.to_ber_contextspecific(2)
end end
[@left.to_ber, seq.to_ber].to_ber_contextspecific 4 [@left.to_s.to_ber, seq.to_ber].to_ber_contextspecific 4
else #equality else #equality
[@left.to_ber, @right.to_ber].to_ber_contextspecific 3 [@left.to_s.to_ber, @right.to_ber].to_ber_contextspecific 3
end end
when :and when :and
ary = [@left.coalesce(:and), @right.coalesce(:and)].flatten ary = [@left.coalesce(:and), @right.coalesce(:and)].flatten