I have a follows strange behaviour in Ruby:
var1.zero? if var1 = 1
NameError: undefined local variable or methodvar1for main:Object
From the other side, if I do same thing in a standard if, all works as expected:
if var1 = 1
var1.zero?
end
# => false
Anyone can describe how work postfix if in Ruby?