Re: match specific blank terms

One last mail from me for now.

The alternative is that I avoid Array#include? and use something like
terms.any?{|t| t == n }

Does anyone have any thoughts on the matter?

On 24 November 2017 at 12:05, Anthony Durity <a.durity@umail.ucc.ie> wrote:

> Ok, having looked at the code for RDF::Node I guess my question is. Why is
> #eql? different to #== for RDF::Node ? That gives me the situation where
> terms.last == n is true but terms.include?(n) gives me false.
>
> On 24 November 2017 at 09:14, Ian Dickinson <i.j.dickinson@gmail.com>
> wrote:
>
>> Hi Anthony,
>> On Thu, Nov 23, 2017 at 10:13 PM, Anthony Durity <a.durity@umail.ucc.ie>
>> wrote:
>> > I was working under the impression that 'local scope' meant local to the
>> > repo.
>> >
>> > Given that I have:
>> > [
>> > #<RDF::URI:0x2ac3bff25014 URI:https://dh.ucc.ie/entity/α54>,
>> > #<RDF::URI:0x2ac3be8bc444 URI:http://www.wikidata.org/prop/direct/P31>,
>> > #<RDF::URI:0x2ac3bff2c5d0 URI:http://www.wikidata.org/entity/Q187685>,
>> > #<RDF::URI:0x2ac3bff32b60 URI:https://dh.ucc.ie/entity/α55>,
>> > #<RDF::URI:0x2ac3bff3f9f0 URI:https://dh.ucc.ie/entity/α56>,
>> > #<RDF::URI:0x2ac3be892504 URI:https://dh.ucc.ie/entity/α57>,
>> > #<RDF::Node:0x2ac3c025570c(_:g47253167721100)>,
>> > #<RDF::Node:0x2ac3bf67d7b8(_:59)>,
>> > #<RDF::Node:0x2ac3c0265d50(_:α60)>
>> > ]
>> > what's the best way to match the blank node 'α60' ? I tried “intern”
>> just
>> > there and it didn't work :/
>>
>> I think it would be easier to offer advice if you could back up a bit
>> and say what you're
>> trying to achieve? As Gregg said, bNodes can be funny things, so the 'best
>> way' to handle them tends to be a bit "well, it depends ..."!
>>
>> Ian
>>
>
>

Received on Friday, 24 November 2017 12:21:31 UTC