val = false || 10
if val == true
pp "TRUE"
else
pp val.to_s
end
This currently results in:
[W] Lint/ComparisonToBoolean: Comparison to a boolean is pointless
> if val == true
^---------^
However I think in this case it's a false positive since val : Bool | Int32, in which case you need the explicit comparison in order to not enter the TRUE block if val happens to be any number.
Given the following code:
This currently results in:
However I think in this case it's a false positive since
val : Bool | Int32
, in which case you need the explicit comparison in order to not enter theTRUE
block ifval
happens to be any number.