rdf 1.1.17 → 1.1.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/rdf/repository.rb +5 -4
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 128b62453db50ad78ceda809ad365b58c289e055
4
- data.tar.gz: c49ca5f523146cdfe978c759b92611a040b23b11
3
+ metadata.gz: 15cede153e5e1329f30828a740b421e93e6a42c8
4
+ data.tar.gz: 8b818ec2b57e912e9df285bdef80cd485b2b9438
5
5
  SHA512:
6
- metadata.gz: 49b2bc9c51cb94dedd0b84f7e6941231abe6989c4809bfc936acfbe2342ec3a5df2fb7dd0d28bf58f64467143ea5fdef86906735112d68079b710ba08ba09de9
7
- data.tar.gz: 96aca6cad7c3ae1ef180b89d95a42ed97c083aa533491c782c9d1978138db42e5f7c6f0f1d71bf06c7c1bef3be6eb99ec7fc311c3f09ab98c4056fe49903eac8
6
+ metadata.gz: fe69708809e8dcccb9f5e43176b561fa66d54bf810be1d2471ed7c385cd3c82b6ddf0c029b09e85c1b72da6c7537c90a68efb37d6764cbb11484b0f8435d85bf
7
+ data.tar.gz: a0198a7412e0b565666ca318a520f6e343a7e9b01af55b8df34d6ff7b081dc3ae8c481b0c3dc39b09d8e349e23ee3de948bd6295d1263934ddf5eb0e644f402d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.17
1
+ 1.1.17.1
@@ -274,7 +274,7 @@ module RDF
274
274
  ##
275
275
  # @private
276
276
  # @see RDF::Enumerable#each_statement
277
- def each_statement
277
+ def each_statement(&block)
278
278
  if block_given?
279
279
  # Note that to iterate in a more consistent fashion despite
280
280
  # possible concurrent mutations to `@data`, we use `#dup` to make
@@ -284,7 +284,8 @@ module RDF
284
284
  ss.dup.each do |s, ps|
285
285
  ps.dup.each do |p, os|
286
286
  os.dup.each do |o|
287
- yield(RDF::Statement.new(s, p, o, :context => c.equal?(DEFAULT_CONTEXT) ? nil : c))
287
+ # FIXME: yield has better performance, but broken in MRI 2.2: See https://bugs.ruby-lang.org/issues/11451.
288
+ block.call(RDF::Statement.new(s, p, o, :context => c.equal?(DEFAULT_CONTEXT) ? nil : c))
288
289
  end
289
290
  end
290
291
  end
@@ -320,7 +321,7 @@ module RDF
320
321
  # Context of `false` matches default context. Unbound variable matches non-false context
321
322
  # @private
322
323
  # @see RDF::Queryable#query
323
- def query_pattern(pattern)
324
+ def query_pattern(pattern, &block)
324
325
  context = pattern.context
325
326
  subject = pattern.subject
326
327
  predicate = pattern.predicate
@@ -338,7 +339,7 @@ module RDF
338
339
  os = os.dup # TODO: is this really needed?
339
340
  os.each do |o|
340
341
  next unless object.nil? || object.eql?(o)
341
- yield(RDF::Statement.new(s, p, o, :context => c.equal?(DEFAULT_CONTEXT) ? nil : c))
342
+ block.call(RDF::Statement.new(s, p, o, :context => c.equal?(DEFAULT_CONTEXT) ? nil : c))
342
343
  end
343
344
  end
344
345
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.17
4
+ version: 1.1.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-10-08 00:00:00.000000000 Z
13
+ date: 2015-10-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: link_header