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

Clear cached XPathContext after attribute change or node removal #1056

Merged

Conversation

mbklein
Copy link
Contributor

@mbklein mbklein commented Feb 26, 2014

In following up on #1034 and trying to fix a bunch of failing tests in projecthydra/om under JRuby, I discovered some XPath queries returning incorrect nodesets. It turned out that while the cached XPathContext was being cleared after certain node manipulations, it wasn't being properly cleared after attribute modifications or node removal.

Both of the added tests fail on the current master and pass with these changes.

@jcoyne
Copy link

jcoyne commented Feb 26, 2014

👍 Looks good.

@headius
Copy link
Contributor

headius commented Feb 26, 2014

Looks ok.

@yokolet yokolet merged commit c49e2bb into sparklemotion:master Mar 1, 2014
@yokolet
Copy link
Member

yokolet commented Mar 1, 2014

Thanks!
After merged the pull request, I moved the clearXpathContext to NokogiriHelpers. So, the code master is a bit different.

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.

4 participants