Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Fixed a bug in RDF::Literal#== for xsd:boolean, xsd:decimal, and xsd:…
Browse files Browse the repository at this point in the history
…double literals.
  • Loading branch information
artob authored and mmn80 committed Dec 17, 2010
1 parent 67cd546 commit cee47fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rdf/model/literal/boolean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def <=>(other)
# @return [Boolean] `true` or `false`
# @since 0.3.0
def ==(other)
(self <=> other).zero?
(cmp = (self <=> other)) ? cmp.zero? : false
end
alias_method :===, :==

Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/model/literal/decimal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def <=>(other)
# @return [Boolean] `true` or `false`
# @since 0.3.0
def ==(other)
(self <=> other).zero?
(cmp = (self <=> other)) ? cmp.zero? : false
end
alias_method :===, :==

Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/model/literal/double.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def <=>(other)
# @return [Boolean] `true` or `false`
# @since 0.3.0
def ==(other)
(self <=> other).zero?
(cmp = (self <=> other)) ? cmp.zero? : false
end
alias_method :===, :==

Expand Down

0 comments on commit cee47fd

Please sign in to comment.