Skip to content

Release 2.0.2

Compare
Choose a tag to compare
@gkellogg gkellogg released this 08 Jul 17:45
· 640 commits to develop since this release
  • Adding this documentation might help clarify pattern matching within RDF::Query::Pattern, too.

  • do not fail with Encoding::CompatibilityError when normalizing unicode IRIs.

  • Fix RDF::List#== comparisons to RDF::Values

    Ruby 2.3.0 changed the behavior of Comparable#== to avoid hiding errors. This led to NoMethodErrors for comparisons that return false for previous Rubies.

    This introduces a custom RDF::List#== implementation for explicitly
    supported comparisons between RDF::Value classes. We return false
    immediately for RDF::Values which are not #list?; falling back on
    Comparable for other types.

    Further, RDF::Lists with three elements that happen to coincide with
    the terms of an RDF::Statement would previously return true. E.g.:
    RDF::List[:s, :p, :o] == RDF::Statement(:s, :p, :o). This unusual edge
    case is patched by way of the changes described above.

  • Adjust List#<=> to avoid error cases

    Using Array(other) instead of other.to_a avoids throwing errors when
    comparing. This minor tweak slightly improves the solution to #304 given
    in #305.