Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Perform literal language comparisons case insensitively.

  • Loading branch information...
commit 395bfdf6d3cc71145dd9508c9bad6c51f95c2ac9 1 parent 10b6229
@gkellogg gkellogg authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/rdf/model/literal.rb
View
7 lib/rdf/model/literal.rb
@@ -199,8 +199,9 @@ def hash
def eql?(other)
self.equal?(other) ||
(self.class.eql?(other.class) &&
- self.datatype.eql?(other.datatype) &&
- self == other)
+ self.value.eql?(other.value) &&
+ self.language.to_s.downcase.eql?(other.language.to_s.downcase) &&
+ self.datatype.eql?(other.datatype))
end
##
@@ -215,7 +216,7 @@ def ==(other)
case other
when Literal
self.value.eql?(other.value) &&
- self.language.eql?(other.language) &&
+ self.language.to_s.downcase == other.language.to_s.downcase &&
self.datatype.eql?(other.datatype)
when String
self.plain? && self.value.eql?(other)
Please sign in to comment.
Something went wrong with that request. Please try again.