Pattern: Use of deprecated flip-flop operator
Issue: -
flip-flop operator is deprecated since Ruby 2.6.0.
# bad
(1..20).each do |x|
puts x if (x == 5) .. (x == 10)
end
# good
(1..20).each do |x|
puts x if (x >= 5) && (x <= 10)
end
Pattern: Use of deprecated flip-flop operator
Issue: -
flip-flop operator is deprecated since Ruby 2.6.0.
# bad
(1..20).each do |x|
puts x if (x == 5) .. (x == 10)
end
# good
(1..20).each do |x|
puts x if (x >= 5) && (x <= 10)
end