oga 2.13-java → 2.14-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e969982f403fc31fde7672ebfd343f2f79eca180
4
- data.tar.gz: e6d9d53776a861bfa2961f83ad2961b117c70282
3
+ metadata.gz: 21160381f90738e0a65a0002282d2b97eb62aa09
4
+ data.tar.gz: a40878e992879fa93c0911310a171347d745c02a
5
5
  SHA512:
6
- metadata.gz: 15045beb266e68ba8df079cf5a467c72f99f693d318c239810e934a12ba2284cbe35b29a03fb740823731ff5c66e7e2ea81fe53295cc102b61ff858513e7d0ed
7
- data.tar.gz: c1b829b167dc3a85db2b0272e2912e40028fcbf03cc01d0c2230d7341f2f7e224a0c1081d6609a32fcbba192adb81b527cf6d98884a37616c1948c4de7a2d47d
6
+ metadata.gz: 6a73ad9723f0cf2f499bbec77b028414f3efe918f80462a4c967c105209e8439cbf5a619a79a82c8d11ac6e56aa20681f3faf7bae15a33578619fa0d2fccacea
7
+ data.tar.gz: a75e00464c6884b106f4c228007b6ae4f3d28bf8a4189440b5d716259c07e4ab9f9bdd730b4959e6eb9edafe7933a0b05b5bc5e7e6de2bbd808938b13e3432a3
data/lib/liboga.jar CHANGED
Binary file
data/lib/oga/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oga
2
- VERSION = '2.13'
2
+ VERSION = '2.14'
3
3
  end # Oga
@@ -99,12 +99,14 @@ module Oga
99
99
  end
100
100
 
101
101
  # @see [Oga::XML::Node#each_ancestor]
102
- def each_ancestor(&block)
102
+ def each_ancestor
103
+ return to_enum(:each_ancestor) unless block_given?
104
+
103
105
  return unless element
104
106
 
105
107
  yield element
106
108
 
107
- element.each_ancestor(&block)
109
+ element.each_ancestor { |ancestor| yield ancestor }
108
110
  end
109
111
 
110
112
  private
data/lib/oga/xml/node.rb CHANGED
@@ -180,6 +180,8 @@ module Oga
180
180
  #
181
181
  # @yieldparam [Oga::XML::Node]
182
182
  def each_ancestor
183
+ return to_enum(:each_ancestor) unless block_given?
184
+
183
185
  node = parent
184
186
 
185
187
  while node.is_a?(XML::Element)
@@ -53,6 +53,8 @@ module Oga
53
53
  #
54
54
  # @yieldparam [Oga::XML::Node]
55
55
  def each
56
+ return to_enum(:each) unless block_given?
57
+
56
58
  @nodes.each { |node| yield node }
57
59
  end
58
60
 
@@ -27,6 +27,8 @@ module Oga
27
27
  #
28
28
  # @yieldparam [Oga::XML::Node] The current node.
29
29
  def each_node
30
+ return to_enum(:each_node) unless block_given?
31
+
30
32
  visit = children.to_a.reverse
31
33
 
32
34
  until visit.empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oga
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.13'
4
+ version: '2.14'
5
5
  platform: java
6
6
  authors:
7
7
  - Yorick Peterse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-05 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement