@@ -65,22 +65,22 @@ def eq(attribute, value)
65
65
new ( :eq , attribute , value )
66
66
end
67
67
68
- ##
69
- # Creates a Filter object indicating a binary comparison.
70
- # this prevents the search data from being forced into a UTF-8 string.
71
- #
72
- # This is primarily used for Microsoft Active Directory to compare
73
- # GUID values.
74
- #
75
- # # for guid represented as hex charecters
76
- # guid = "6a31b4a12aa27a41aca9603f27dd5116"
77
- # guid_bin = [guid].pack("H*")
78
- # f = Net::LDAP::Filter.bineq("objectGUID", guid_bin)
79
- #
80
- # This filter does not perform any escaping.
81
- def bineq ( attribute , value )
82
- new ( :bineq , attribute , value )
83
- end
68
+ ##
69
+ # Creates a Filter object indicating a binary comparison.
70
+ # this prevents the search data from being forced into a UTF-8 string.
71
+ #
72
+ # This is primarily used for Microsoft Active Directory to compare
73
+ # GUID values.
74
+ #
75
+ # # for guid represented as hex charecters
76
+ # guid = "6a31b4a12aa27a41aca9603f27dd5116"
77
+ # guid_bin = [guid].pack("H*")
78
+ # f = Net::LDAP::Filter.bineq("objectGUID", guid_bin)
79
+ #
80
+ # This filter does not perform any escaping.
81
+ def bineq ( attribute , value )
82
+ new ( :bineq , attribute , value )
83
+ end
84
84
85
85
##
86
86
# Creates a Filter object indicating extensible comparison. This Filter
@@ -414,10 +414,8 @@ def to_raw_rfc2254
414
414
case @op
415
415
when :ne
416
416
"!(#{ @left } =#{ @right } )"
417
- when :eq
417
+ when :eq , :bineq
418
418
"#{ @left } =#{ @right } "
419
- when :bineq
420
- "#{ @left } =#{ @right } "
421
419
when :ex
422
420
"#{ @left } :=#{ @right } "
423
421
when :ge
@@ -527,9 +525,9 @@ def to_ber
527
525
else # equality
528
526
[ @left . to_s . to_ber , unescape ( @right ) . to_ber ] . to_ber_contextspecific ( 3 )
529
527
end
530
- when :bineq
531
- # make sure data is not forced to UTF-8
532
- [ @left . to_s . to_ber , unescape ( @right ) . to_ber_bin ] . to_ber_contextspecific ( 3 )
528
+ when :bineq
529
+ # make sure data is not forced to UTF-8
530
+ [ @left . to_s . to_ber , unescape ( @right ) . to_ber_bin ] . to_ber_contextspecific ( 3 )
533
531
when :ex
534
532
seq = [ ]
535
533
0 commit comments