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

call canonicalize instead of canonicalize! for URIs #5533

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

elrayle
Copy link
Contributor

@elrayle elrayle commented Mar 14, 2022

Calling canonicalize! updates the URI object. When the URI is frozen, this results in error <FrozenError: can’t modify frozen RDF::URI…>

The canonicalize, defined in RDF::URI, makes a copy of the URI object first and then calls canonicalize!

refs #5254; refs #5493

This issue was introduced in PR #5254. And it is a blocker for follow-on work in PR #5493.

@samvera/hyrax-code-reviewers

@elrayle elrayle mentioned this pull request Mar 14, 2022
cjcolvar
cjcolvar previously approved these changes Mar 14, 2022
Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

Good catch!

Calling `canonicalize!` updates the URI object.  When the URI is frozen, this results in error `<FrozenError: can’t modify frozen RDF::URI…>`

The `canonicalize`, defined in `RDF::URI` makes a copy of the URI object first and then calls `canonicalize!`
@elrayle elrayle merged commit cc8247f into main Mar 15, 2022
@elrayle elrayle deleted the 5493_canonical_error branch March 15, 2022 14:40
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.

None yet

2 participants