(PUP-2950) Enable rubocop Style/AndOr

Replacing only the pattern
's#^(.*) if +([^ ]+) +([!=~+-<>]+) +([^ ]+) and ([^ ]+) ([!=~+-><]+) +([^ \n]+)$#$1 if ($2 $3 $4) && ($5 $6 $7)#g'
's#^(.*) if +([^ ]+) +([!=~+-<>]+) +([^ ]+) or ([^ ]+) ([!=~+-><]+) +([^ \n]+)$#$1 if ($2 $3 $4) || ($5 $6 $7)#g'
(PUP-2950) Enable rubocop Style/AndOr

's#^(.*) if +([^ ]+) +([!=~+-<>]+) +([^ ]+) or ([^ \n]+)$#$1 if ($2 $3 $4) || $5#g'
's#^(.*) if +([^ ]+) or ([^ ]+) ([!=~+-><]+) +([^ \n]+)$#$1 if $2 || ($3 $4 $5)#g'
's#^(.*) if +([^ ]+) +([!=~+-<>]+) +([^ ]+) and ([^ \n]+)$#$1 if ($2 $3 $4) && $5#g'
's#^(.*) if +([^ ]+) and ([^ ]+) ([!=~+-><]+) +([^ \n]+)$#$1 if $2 && ($3 $4 $5)#g'
(PUP-2950) Enable rubocop Style/AndOr

Only patterns
's#(.*) +unless +([^ ]+) +or +([^ ]+)$#$1 unless $2 || $3#g'
's#(.*) +unless +([^ ]+) +and +([^ ]+)$#$1 unless $2 && $3#g'
(PUP-2950) Enable rubocop Style/AndOr
(PUP-2950) Enable rubocop Style/AndOr
(PUP-2950) Enable rubocop Style/AndOr

Use rubocop autocorrect
(PUP-2950) Enable rubocop Style/AndOr

replacing only patterns

's#([ ]*)if +([^ ]+) +and +([^ ]+)$#${1}if $2 && $3#g'
's#([ ]*)if +([^ ]+) +or +([^ ]+)$#${1}if $2 || $3#g'
's#([ ]*)if +([^ ]+) +and not +([^ ]+)$#${1}if $2 && !$3#g'
's#([ ]*)if not +([^ ]+) +and not +([^ ]+)$#${1}if !$2 && !$3#g'
's#([ ]*)if not +([^ ]+) +and +([^ ]+)$#${1}if !$2 && $3#g'
(PUP-2950) Enable rubocop Style/AndOr

Replacing only patterns

's#^([^ ]+) +and +([^ ]+)$#$1 && $2#g'
's#^([^ ]+) +or +([^ ]+)$#$1 || $2#g'
's#^( *[^ ]+) +and +([^ ]+)$#$1 && $2#g'
's#^( *[^ ]+) +or +([^ ]+)$#$1 || $2#g'
(PUP-2950) consistent spacing with `!`
(PUP-2950) Enable rubocop Style/AndOr
(PUP-2950) Enable rubocop Style/AndOr
(PUP-2950) Enable rubocop Style/AndOr
(PUP-2950) Enable rubocop Style/AndOr

's#^( *)([^ ]+) +or raise (.*)$#$1$2 || (raise $3)#g'
(PUP-2950) Enable rubocop Style/AndOr

's#^( *)([^ ]+) +or return (.*)$#$1$2 || (return $3)#g'
(PUP-2950) Enable rubocop Style/AndOr

by hand on ^lib
(PUP-2950) Enable rubocop Style/AndOr (no auto)
(PUP-2950) Enable rubocop Style/AndOr (noauto)
(PUP-2950) Enable rubocop Style/AndOr (regularize !)
(PUP-2950) Enable rubocop Style/AndOr (no auto)