Is undefined variable equal to nil in Ruby?

Viewed 12163

I got error as undefined variable, I know nil is evaluated to false if used as boolean:

if y
  puts "Something"
end
3 Answers
Related