File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ def n_range?(node)
40
40
end
41
41
42
42
%i[
43
+ and
43
44
arg
44
45
args
45
46
array
@@ -67,6 +68,7 @@ def n_range?(node)
67
68
lambda
68
69
lvar
69
70
match_rest
71
+ or
70
72
pair
71
73
rescue
72
74
send
Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ class Unary < self
12
12
13
13
private_constant ( *constants ( false ) )
14
14
15
- def dispatch
15
+ def dispatch # rubocop:disable Metrics/AbcSize
16
16
name = selector
17
17
first_child = children . fetch ( 0 )
18
18
19
- if n_flipflop? ( first_child )
19
+ if n_flipflop? ( first_child ) || n_and? ( first_child ) || n_or? ( first_child )
20
20
write 'not '
21
21
else
22
22
write ( MAP . fetch ( name , name ) . to_s )
Original file line number Diff line number Diff line change
1
+ !( foo and bar )
2
+ !( foo or bar )
3
+ not( foo and bar )
4
+ not( foo or bar )
5
+ ! foo and bar
6
+ ! foo or bar
7
+ not foo and bar
8
+ not foo or bar
9
+ !( foo && bar )
10
+ !( foo || bar )
11
+ not( foo && bar )
12
+ not( foo || bar )
13
+ ! foo && bar
14
+ ! foo || bar
15
+ not foo && bar
16
+ not foo || bar
You can’t perform that action at this time.
0 commit comments