Skip to content

Commit fece50c

Browse files
author
Austin Ziegler
committed
Making return codes consistent for add and modify.
1 parent a382439 commit fece50c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

History.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
* Replaced calls to #to_a with calls to Kernel#Array; since Ruby 1.8.3, the
2929
default #to_a implementation has been deprecated and should be replaced
3030
either with calls to Kernel#Array or [value].flatten(1).
31+
* Modified #add and #modify to return a Pdu#result_code instead of a
32+
Pdu#result. This may be changed in Net::LDAP 1.0 to return the full
33+
Pdu#result, but if we do so, it will be that way for all LDAP calls
34+
involving Pdu objects.
3135

3236
=== Net::LDAP 0.1.1 / 2010-03-18
3337
* Fixing a critical problem with sockets.

lib/net/ldap.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ def modify args
15131513
@conn.write pkt
15141514

15151515
(be = @conn.read_ber(AsnSyntax)) && (pdu = LdapPdu.new( be )) && (pdu.app_tag == 7) or raise LdapError.new( "response missing or invalid" )
1516-
pdu.result
1516+
pdu.result_code
15171517
end
15181518

15191519
#--
@@ -1536,7 +1536,7 @@ def add args
15361536
@conn.write pkt
15371537

15381538
(be = @conn.read_ber(AsnSyntax)) && (pdu = LdapPdu.new( be )) && (pdu.app_tag == 9) or raise LdapError.new( "response missing or invalid" )
1539-
pdu.result
1539+
pdu.result_code
15401540
end
15411541

15421542
#--

0 commit comments

Comments
 (0)