This question already has an answer Confusion with the assignment operation inside a falsy `if` block
  if false
      y = 'hi'
   end
  puts y
In ruby y has been "defined" in the if block,it will be nil(why?). Remove that block and this gives an error.
But, in python
 if False:
   y = 'hi'
 print y
It will gives an error.
What's happens in Ruby and Python?