oga 2.1-java → 2.2-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: e981f6e682ae79eb44c74e805c785d85f32c7cbc
4
- data.tar.gz: 1e3188a4106bc96ec7968e393bc44feb7b3502c7
3
+ metadata.gz: 163b0e7eadf5bb5ebadb66dc597decb340081f8f
4
+ data.tar.gz: d69fa27825859e9facb54c4086636c7cc747f5bb
5
5
  SHA512:
6
- metadata.gz: 78bb3d61fff33c9184521adb690f7c40f8bcbc465077fe2cfc84f36ca5aa70e19ef4a849fa45e18a4b56182da041f9c06620cdf203a898f2b988e72146c70682
7
- data.tar.gz: 6c156b860e293fef6819b40af1fa693bb6d9bd3827898fbadc183e9bc216d17c6c2e206dbb978c1c439ff3b8aeb171c0af7b22b822dd162533e02becb5c2e092
6
+ metadata.gz: 624e6f145b2dbef574096a5a0e4bd2201549efabe3864f376b3d287c82c0b2acb1878ac90ffea47f4992cc4447b1dbba0885088f99f343b8e1aa65a03f167b90
7
+ data.tar.gz: 066f854584acda346eacd3155c1ff44ed1452174483d9c2633d9a84c61fdbfc141509d54af3e3b456673d4c745f4f885194bf7c7bfd0a09be8c8e13d81df905a
data/README.md CHANGED
@@ -162,6 +162,7 @@ Querying a document using a namespace:
162
162
  * Support for XPath 1.0
163
163
  * CSS3 selector support
164
164
  * XML namespace support (registering, querying, etc)
165
+ * Windows support
165
166
 
166
167
  ## Requirements
167
168
 
Binary file
@@ -1,3 +1,3 @@
1
1
  module Oga
2
- VERSION = '2.1'
2
+ VERSION = '2.2'
3
3
  end # Oga
@@ -590,16 +590,20 @@ module Oga
590
590
  def on_pipe(ast, input, &block)
591
591
  left, right = *ast
592
592
 
593
- union = unique_literal(:union)
594
- conversion = literal(Conversion)
595
-
596
- union.assign(literal(XML::NodeSet).new)
597
- .followed_by(process(left, input) { |node| union << node })
598
- .followed_by(process(right, input) { |node| union << node })
599
- .followed_by do
600
- # block present means we're in a predicate
601
- block ? conversion.to_boolean(union).if_true(&block) : union
602
- end
593
+ union = unique_literal(:union)
594
+
595
+ # Expressions such as "a | b | c"
596
+ if left.type == :pipe
597
+ union.assign(process(left, input))
598
+ .followed_by(process(right, input) { |node| union << node })
599
+ .followed_by(union)
600
+ # Expressions such as "a | b"
601
+ else
602
+ union.assign(literal(XML::NodeSet).new)
603
+ .followed_by(process(left, input) { |node| union << node })
604
+ .followed_by(process(right, input) { |node| union << node })
605
+ .followed_by(union)
606
+ end
603
607
  end
604
608
 
605
609
  # @param [AST::Node] ast
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.1'
4
+ version: '2.2'
5
5
  platform: java
6
6
  authors:
7
7
  - Yorick Peterse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-09 00:00:00.000000000 Z
11
+ date: 2016-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement