We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42bdeb9 commit a4819e5Copy full SHA for a4819e5
lib/net/ldap.rb
@@ -619,7 +619,7 @@ def search(args = {})
619
end
620
621
args[:base] ||= @base
622
- result_set = (args and args[:return_result] == false) ? nil : []
+ result_set = args[:return_result] == false ? nil : []
623
624
if @open_connection
625
@result = @open_connection.search(args) { |entry|
@@ -642,7 +642,11 @@ def search(args = {})
642
643
644
645
- result_set || @result == 0
+ if args[:return_result]
646
+ @result == 0 ? result_set : nil
647
+ else
648
+ @result == 0
649
+ end
650
651
652
# #bind connects to an LDAP server and requests authentication based on
0 commit comments