Skip to content

Bug fixes to 0.9.0 #168

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

Conversation

WoodsBagotAndreMarquesLee
Copy link
Contributor

Hey, I just fixed up a couple of the little issues I had when I tried to use your gem out-of-the-box. For what it's worth, it's entirely possible that I only encountered the nil-checking bug because one of my co-workers was messing around with our LDAP server while I was composing and testing my search query, it might not be a problem when working with an operational server.

Implemented a couple of bug fixes:

  • Connection#search now does more graceful nil-checking in its ensure clause, reducing cryptic crash messages
  • Filter class methods should now be able to gracefully accept numeric literals as filter rhs values

  * Connection#search now does more graceful nil-checking in its ensure clause, reducing cryptic crash messages
  * Filter class methods should now be able to gracefully accept numeric literals as filter rhs values
right.to_s
else
raise ArgumentError, "Did not know how to convert argument \"#{right}\" into the rhs of an LDAP filter"
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be comfortable with always calling right.to_s.gsub instead of introducing conditional branching.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, add a simple test to make sure this works! :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b133b31

@mtodd
Copy link
Member

mtodd commented Dec 4, 2014

Thanks for the bugfixes @WoodsBagotAndreMarquesLee! Really appreciate you taking the time and expending the effort to help out.

I notice that this PR is open against the release-0.9.0 branch. Since 0.9.0 is already released, changes should be targeting master which can be individually backported/cherry-picked as necessary. Do you mind addressing the comments I've included (minimal tests and style remarks) and reopening this PR against master? Thanks! And let me know how I can help.

@mtodd
Copy link
Member

mtodd commented Dec 10, 2014

@WoodsBagotAndreMarquesLee hey there, any chance you could rebase this off of master and submit as a new PR? I can't accept this against the release-0.9.0 branch. Thanks!

@jch
Copy link
Member

jch commented Jan 7, 2015

Superseded by #184

@jch jch closed this Jan 7, 2015
jch added a commit that referenced this pull request Jan 8, 2015
…nescape

Rebase #168: Connection#unescape handles numerics, #search guards against nil queued_reads
astratto pushed a commit to astratto/ruby-net-ldap that referenced this pull request Dec 18, 2015
…numeric-unescape

Rebase ruby-ldap#168: Connection#unescape handles numerics, #search guards against nil queued_reads
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

Successfully merging this pull request may close these issues.

3 participants