Skip to content

Commit 271c685

Browse files
author
blackhedd
committed
Enabled the left side of a filter-specification to be a Symbol.
Previously it had to be a String.
1 parent c30a198 commit 271c685

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/net/ldap/filter.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def to_ber
180180
case @op
181181
when :eq
182182
if @right == "*" # present
183-
@left.to_ber_contextspecific 7
183+
@left.to_s.to_ber_contextspecific 7
184184
elsif @right =~ /[\*]/ #substring
185185
ary = @right.split( /[\*]+/ )
186186
final_star = @right =~ /[\*]$/
@@ -198,9 +198,9 @@ def to_ber
198198
unless final_star
199199
seq << ary.shift.to_ber_contextspecific(2)
200200
end
201-
[@left.to_ber, seq.to_ber].to_ber_contextspecific 4
201+
[@left.to_s.to_ber, seq.to_ber].to_ber_contextspecific 4
202202
else #equality
203-
[@left.to_ber, @right.to_ber].to_ber_contextspecific 3
203+
[@left.to_s.to_ber, @right.to_ber].to_ber_contextspecific 3
204204
end
205205
when :and
206206
ary = [@left.coalesce(:and), @right.coalesce(:and)].flatten

0 commit comments

Comments
 (0)