Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Modify functions were broken. #1

Closed
wants to merge 1 commit into from

2 participants

@jorrizza

Every function that modified LDAP attributes broke. This quickly fixes it. Don't know if it's the right way, but it seems to work for me :)

@halostatue

The unit tests fail under this change.

 1) Error:
test_modify_ops_add(TestLDAP):
NoMethodError: undefined method `modify_ops' for Net::LDAP::Connection:Class
    ./test/test_ldap_connection.rb:13:in `test_modify_ops_add'

  2) Error:
test_modify_ops_delete(TestLDAP):
NoMethodError: undefined method `modify_ops' for Net::LDAP::Connection:Class
    ./test/test_ldap_connection.rb:6:in `test_modify_ops_delete'

  3) Error:
test_modify_ops_replace(TestLDAP):
NoMethodError: undefined method `modify_ops' for Net::LDAP::Connection:Class
    ./test/test_ldap_connection.rb:20:in `test_modify_ops_replace'

28 tests, 145 assertions, 0 failures, 3 errors
rake aborted!
@halostatue

I've fixed this and pushed out 0.2.1.

@halostatue halostatue closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2011
  1. @jorrizza
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/net/ldap.rb
View
4 lib/net/ldap.rb
@@ -1452,9 +1452,9 @@ def search(args = {})
result_code
end
- def self.modify_ops args
+ def modify_ops args
modify_ops = []
- a = args[:operations] and a.each {|op, attr, values|
+ a = args and a.each {|op, attr, values|
# TODO, fix the following line, which gives a bogus error
# if the opcode is invalid.
op_1 = {:add => 0, :delete => 1, :replace => 2} [op.to_sym].to_ber_enumerated
Something went wrong with that request. Please try again.