Ruby:
foo = 5 if false
foo # => nil
# Merely passing an assignment defines the variable, even if it does not execute.
Python:
foo
if False: foo = 5
# The first expression raises UnboundLocalError
In this case, Python is more strict, since you don’t get implicit nil everywhere, but ruby is less surprising, since all execution paths declare the variable.