Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensured that enumerators returned from RDF::Graph support the #empty?…

… and #count methods.
  • Loading branch information...
commit b980aa1d1a5a377dc6a5e372ecccf9cb1770a4d4 1 parent 6b6fe9a
@bendiken authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rdf/model/graph.rb
View
4 lib/rdf/model/graph.rb
@@ -126,7 +126,7 @@ def unnamed?
#
# @return [Enumerator<RDF::Resource>]
def contexts
- (named? ? [context] : []).to_enum
+ (named? ? [context] : []).to_enum.extend(RDF::Countable)
end
##
@@ -236,7 +236,7 @@ def clear_statements
# @see RDF::Enumerable#graphs
# @since 0.2.0
def graphs
- [self].to_enum
+ enum_graph
end
##
Please sign in to comment.
Something went wrong with that request. Please try again.