Skip to content

Commit

Permalink
Avoid an instantiation if subject is already a RDF::URI
Browse files Browse the repository at this point in the history
This prevents a deprecation warning like:
```
[DEPRECATION] URI#to_hash is deprecated, use URI#to_h instead. Called
from
/home/travis/build/projecthydra-labs/hyku/vendor/bundle/ruby/2.3.0/gems/ldp-0.6.2/lib/ldp/resource.rb:30
```
  • Loading branch information
jcoyne committed Jan 13, 2017
1 parent 1d9d79e commit 42d31a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ldp/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def initialize client, subject, response = nil, base_path = ''
##
# Get the graph subject as a URI
def subject_uri
@subject_uri ||= RDF::URI.new subject
@subject_uri ||= RDF::URI(subject)
end

##
Expand Down

0 comments on commit 42d31a7

Please sign in to comment.