Permalink
Browse files

Really fixing #modify this time.

Didn't call the right method before, even though the method itself was
fixed properly.
  • Loading branch information...
1 parent d6ad919 commit 028cdeebbd5ff8262ddcaa12811253536a6edcd3 Austin Ziegler committed Mar 26, 2011
Showing with 12 additions and 8 deletions.
  1. +4 −0 History.rdoc
  2. +1 −1 lib/net/ber.rb
  3. +6 −6 lib/net/ldap.rb
  4. +1 −1 lib/net/snmp.rb
View
@@ -1,3 +1,7 @@
+=== Net::LDAP 0.2.2 / 2011-03-26
+* Bug Fixes:
+ * Fixed the call to Net::LDAP.modify_ops from Net::LDAP#modify.
+
=== Net::LDAP 0.2.1 / 2011-03-23
* Bug Fixes:
* Net::LDAP.modify_ops was broken and is now fixed.
View
@@ -106,7 +106,7 @@ module Net # :nodoc:
# <tr><th>BMPString</th><th>C</th><td>30: 62 (0x3e, 0b00111110)</td></tr>
# </table>
module BER
- VERSION = '0.2.1'
+ VERSION = '0.2.2'
##
# Used for BER-encoding the length and content bytes of a Fixnum integer
View
@@ -241,7 +241,7 @@ class LDAP
# and then keeps it open while it executes a user-supplied block.
# Net::LDAP#open closes the connection on completion of the block.
class Net::LDAP
- VERSION = "0.2.1"
+ VERSION = "0.2.2"
class LdapError < StandardError; end
@@ -1459,18 +1459,18 @@ def search(args = {})
}
def self.modify_ops(operations)
- modify_ops = []
+ ops = []
if operations
operations.each { |op, attrib, values|
# TODO, fix the following line, which gives a bogus error if the
# opcode is invalid.
op_ber = MODIFY_OPERATIONS[op.to_sym].to_ber_enumerated
values = [ values ].flatten.map { |v| v.to_ber if v }.to_ber_set
values = [ attrib.to_s.to_ber, values ].to_ber_sequence
- modify_ops << [ op_ber, values ].to_ber
+ ops << [ op_ber, values ].to_ber
}
end
- modify_ops
+ ops
end
#--
@@ -1482,9 +1482,9 @@ def self.modify_ops(operations)
#++
def modify(args)
modify_dn = args[:dn] or raise "Unable to modify empty DN"
- modify_ops = modify_ops args[:operations]
+ ops = self.class.modify_ops args[:operations]
request = [ modify_dn.to_ber,
- modify_ops.to_ber_sequence ].to_ber_appsequence(6)
+ ops.to_ber_sequence ].to_ber_appsequence(6)
pkt = [ next_msgid.to_ber, request ].to_ber_sequence
@conn.write pkt
View
@@ -2,7 +2,7 @@
# :stopdoc:
module Net
class SNMP
- VERSION = '0.2.1'
+ VERSION = '0.2.2'
AsnSyntax = Net::BER.compile_syntax({
:application => {

0 comments on commit 028cdee

Please sign in to comment.