Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `delete' for Net::LDAP::Filter #4

Open
freibuis opened this issue Jul 7, 2015 · 5 comments
Open

undefined method `delete' for Net::LDAP::Filter #4

freibuis opened this issue Jul 7, 2015 · 5 comments

Comments

@freibuis
Copy link

freibuis commented Jul 7, 2015

This line

options[:filter].delete(:in)

(https://github.com/Mazwak/active_directory/blob/master/lib/active_directory/base.rb#L269)

causes undefined method 'delete' for Net::LDAP::Filter if I delete this.. it seems to work (not sure what it was trying to do in the first place)

I cant find any method called delete on Net::LDAP::Filter

This is issue was introduced from 1.6.0 -> 1.6.1

@freibuis
Copy link
Author

freibuis commented Jul 9, 2015

I rolled back this commit and a problems disappeared. commit 423e786

I am not sure wihat this commit is trying to achieve

 in => (args[1].nil?) ? '' : ( args[1][:in] || '' )

wouldnt it be better just to have

in: ''

@a2f0
Copy link

a2f0 commented Nov 19, 2016

I can confirm that this problem exists in 1.6.1 and reverting to 1.6.0 fixes the issue.

@alilland
Copy link

this is still present in v1.6.1

@frankschmitt
Copy link

The sad thing is that this breaks the basic example from the docs (because find(:all) without providing any filter raises the exception), thereby greatly diminishing the usefulness of the active_directory gem.

@tasaif
Copy link

tasaif commented Feb 27, 2020

Comment out line 269 in ~/.rvm/gems/ruby-2.4.1/gems/active_directory-1.6.1.1/lib/active_directory/base.rb

267 :in => (args[1].nil?) ? '' : ( args[1][:in] || '' )
268 }
269 #options[:filter].delete(:in)
270
271 cached_results = find_cached_results(args[1])
272 return cached_results if cached_results or cached_results.nil?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants