weird behavior with class compares
Bug #185826 reported by
Mike Travers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ActiveRDF |
New
|
Undecided
|
Unassigned |
Bug Description
This was utterly confusing me, until I figured out it is because ActiveRDF specializes the == method for its classes!
>> b = BNode.new("foo")
=> #<BNode:0x371ace8 @predicates={}, @uri="foo">
>> b.class
=> BNode
>> RDFS::Resource
=> RDFS::Resource
>> BNode.class
=> Class
>> RDFS::Resource.
=> Class
>> b.class == RDFS::Resource
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.uri
from /usr/local/
from /usr/local/
from (irb):79
from :0
To post a comment you must log in.
There is a bug here and its that BNode doesn't have a class_uri set.
b.class != RDFS::Resource class
b.class == RDFS::Resource.