Proper handling of RDFS::Resource#to_s by RDFS::Resource#initialize

Bug #152140 reported by michael
2
Affects Status Importance Assigned to Milestone
ActiveRDF
Fix Committed
Low
Eyal Oren

Bug Description

Simple patch to allow RDFS::Resource#initialize to accept the output of RDFS::Resource#to_s such that

uri = "foo"
RDFS::Resource.new((res = RDFS::Resource.new(uri)).to_s) == res => true

--- lib/active_rdf/objectmanager/resource.rb 2007-09-20 20:35:26 +0000
+++ lib/active_rdf/objectmanager/resource.rb 2007-10-12 20:33:31 +0000
@@ -27,6 +27,8 @@
       @uri = case uri
             when RDFS::Resource
              uri.uri
+ when /\A<([^>]*)>\Z/
+ uri.gsub(/\A<|>\Z/,'')
             when String
               uri
             else

description: updated
Revision history for this message
Eyal Oren (ikbeneyal) wrote :

thx, implemented

Changed in activerdf:
assignee: nobody → ikbeneyal
importance: Undecided → Low
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.