boolean-expression 0.0.2 → 0.0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/boolean/expression.rb +4 -0
  2. metadata +1 -1
@@ -100,6 +100,10 @@ class Boolean::Expression
100
100
 
101
101
  private
102
102
  def _check (group)
103
+ if group.first.is_a?(Logic) && group.first.type != :not
104
+ raise SyntaxError, "the expression cannot start with AND/OR: #{group}"
105
+ end
106
+
103
107
  group.each_with_index {|piece, index|
104
108
  if piece.is_a?(Group)
105
109
  _check(piece)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boolean-expression
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: