Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Optimized RDF::Queryable#query_pattern a tad.

  • Loading branch information...
commit b4562277b70ab6c1e6acfc7ff262fd4e315dbf62 1 parent eefe320
@bendiken authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/rdf/mixin/queryable.rb
View
3  lib/rdf/mixin/queryable.rb
@@ -68,7 +68,8 @@ def enum.to_a
# @see RDF::Queryable#query
# @since 0.2.0
def query_pattern(pattern, &block)
- find_all { |statement| pattern === statement }.each(&block)
+ # @see http://ruby-doc.org/core/classes/Enumerable.html#M003121
+ grep(pattern, &block)
end
protected :query_pattern
Please sign in to comment.
Something went wrong with that request. Please try again.