In php, I can comfortably write:
if (x > 100)
{
method();
}
knowing that if x doesn't exist, my program will treat it as a small bump in the road and keep going.
I'm used to php's ultra-lax variable typing and undeclared handling, and wondering what the rules of Ruby are in relation to this.
What is Ruby's default action when you try to evaluate something that isn't declared?
And if I can pepper this in too... does null, zero, and false equal the same thing in Ruby? Would
if(!x)
{
puts 'works'
}
puts?
I know these are very simple questions, but either they're too obvious for me to catch or I'm using the wrong search phrases.