Skip to content

Commit 028cdee

Browse files
author
Austin Ziegler
committed
Really fixing #modify this time.
Didn't call the right method before, even though the method itself was fixed properly.
1 parent d6ad919 commit 028cdee

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

History.rdoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
=== Net::LDAP 0.2.2 / 2011-03-26
2+
* Bug Fixes:
3+
* Fixed the call to Net::LDAP.modify_ops from Net::LDAP#modify.
4+
15
=== Net::LDAP 0.2.1 / 2011-03-23
26
* Bug Fixes:
37
* Net::LDAP.modify_ops was broken and is now fixed.

lib/net/ber.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module Net # :nodoc:
106106
# <tr><th>BMPString</th><th>C</th><td>30: 62 (0x3e, 0b00111110)</td></tr>
107107
# </table>
108108
module BER
109-
VERSION = '0.2.1'
109+
VERSION = '0.2.2'
110110

111111
##
112112
# Used for BER-encoding the length and content bytes of a Fixnum integer

lib/net/ldap.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class LDAP
241241
# and then keeps it open while it executes a user-supplied block.
242242
# Net::LDAP#open closes the connection on completion of the block.
243243
class Net::LDAP
244-
VERSION = "0.2.1"
244+
VERSION = "0.2.2"
245245

246246
class LdapError < StandardError; end
247247

@@ -1459,18 +1459,18 @@ def search(args = {})
14591459
}
14601460

14611461
def self.modify_ops(operations)
1462-
modify_ops = []
1462+
ops = []
14631463
if operations
14641464
operations.each { |op, attrib, values|
14651465
# TODO, fix the following line, which gives a bogus error if the
14661466
# opcode is invalid.
14671467
op_ber = MODIFY_OPERATIONS[op.to_sym].to_ber_enumerated
14681468
values = [ values ].flatten.map { |v| v.to_ber if v }.to_ber_set
14691469
values = [ attrib.to_s.to_ber, values ].to_ber_sequence
1470-
modify_ops << [ op_ber, values ].to_ber
1470+
ops << [ op_ber, values ].to_ber
14711471
}
14721472
end
1473-
modify_ops
1473+
ops
14741474
end
14751475

14761476
#--
@@ -1482,9 +1482,9 @@ def self.modify_ops(operations)
14821482
#++
14831483
def modify(args)
14841484
modify_dn = args[:dn] or raise "Unable to modify empty DN"
1485-
modify_ops = modify_ops args[:operations]
1485+
ops = self.class.modify_ops args[:operations]
14861486
request = [ modify_dn.to_ber,
1487-
modify_ops.to_ber_sequence ].to_ber_appsequence(6)
1487+
ops.to_ber_sequence ].to_ber_appsequence(6)
14881488
pkt = [ next_msgid.to_ber, request ].to_ber_sequence
14891489
@conn.write pkt
14901490

lib/net/snmp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# :stopdoc:
33
module Net
44
class SNMP
5-
VERSION = '0.2.1'
5+
VERSION = '0.2.2'
66

77
AsnSyntax = Net::BER.compile_syntax({
88
:application => {

0 commit comments

Comments
 (0)