oga 3.3-java → 3.4-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
  SHA256:
3
- metadata.gz: 488cc4cae855fc6099db7c9d53ef30a3570151d4d42e7dd8083a2bb213722abf
4
- data.tar.gz: ce081e5e52467f8df20bf76266debb8587fafa5e57637ef8f6a3a19859e72b65
3
+ metadata.gz: e4f9c47be98cdb2d8108f3abb9c60383a21f3fd88d22ea24090149c966b61abe
4
+ data.tar.gz: 5fa65f1eb644d7d58d2ffec90e03523802ad20e285c3a4729d33640c1009c1a0
5
5
  SHA512:
6
- metadata.gz: a484ebf081ae372f491538f3b9d87157093563c8f237fd79f065053b83451ae67d2cf7bc8325381e39c65635475a9c74958a99fd8042f0ee3f65ede7d9e05cba
7
- data.tar.gz: ffcad75210e7400462ff0fd0f0144d5b15f6cdc6be187b613f5a0e8a2a8133c6028c16106d34e024a89e9c488a7732d96591b5e43d51bf57baacccc77b90ccdb
6
+ metadata.gz: f1e020b32addfdd6cc375ea9746f4a4af33c870af28aa46ed0d5189a46a9b6cae03c3379c6681b28f9d146558cda77c79a74939f5615124b7c32c51ed9116dc6
7
+ data.tar.gz: 12a4f2dc9e4c43c23cc45fbfdee49f75f1bfba400b007fbe6f17a6edbafcb2cc4ca66e018f4634177b10b2f30cf44c9c9ca26589a395c989f39c991f0e81091e
data/lib/liboga.jar CHANGED
Binary file
data/lib/oga/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oga
2
- VERSION = '3.3'
2
+ VERSION = '3.4'
3
3
  end # Oga
@@ -46,6 +46,8 @@ module Oga
46
46
  # @param [Oga::XML::NodeSet|Array] nodes
47
47
  def children=(nodes)
48
48
  if nodes.is_a?(NodeSet)
49
+ nodes.owner = self
50
+ nodes.take_ownership_on_nodes
49
51
  @children = nodes
50
52
  else
51
53
  @children = NodeSet.new(nodes, self)
data/lib/oga/xml/node.rb CHANGED
@@ -49,6 +49,8 @@ module Oga
49
49
  # @param [Oga::XML::NodeSet|Array] nodes
50
50
  def children=(nodes)
51
51
  if nodes.is_a?(NodeSet)
52
+ nodes.owner = self
53
+ nodes.take_ownership_on_nodes
52
54
  @children = nodes
53
55
  else
54
56
  @children = NodeSet.new(nodes, self)
@@ -42,11 +42,7 @@ module Oga
42
42
  @owner = owner
43
43
  @existing = {}
44
44
 
45
- @nodes.each_with_index do |node, index|
46
- mark_existing(node)
47
-
48
- take_ownership(node, index) if @owner
49
- end
45
+ take_ownership_on_nodes
50
46
  end
51
47
 
52
48
  # Yields the supplied block for every node.
@@ -289,6 +285,14 @@ module Oga
289
285
  "NodeSet(#{values})"
290
286
  end
291
287
 
288
+ def take_ownership_on_nodes
289
+ @nodes.each_with_index do |node, index|
290
+ mark_existing(node)
291
+
292
+ take_ownership(node, index) if @owner
293
+ end
294
+ end
295
+
292
296
  private
293
297
 
294
298
  # Takes ownership of the given node. This only occurs when the current
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: '3.3'
4
+ version: '3.4'
5
5
  platform: java
6
6
  authors:
7
7
  - Yorick Peterse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-27 00:00:00.000000000 Z
11
+ date: 2022-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -225,8 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubyforge_project:
229
- rubygems_version: 2.7.10
228
+ rubygems_version: 3.2.29
230
229
  signing_key:
231
230
  specification_version: 4
232
231
  summary: Oga is an XML/HTML parser written in Ruby.