As I understand it, there isn’t really a concept of “declaring” a
variable in ruby. When I make an assignment to a variable, it’s
automatically created with the type of the rvalue if needed.
If I try to read a variable that doesn’t exist, I’ll get an exception.
But what if I try to set the wrong variable name? e.g.:
number = 3
numbr += 1 # a typo
puts number # prints 3, but should have printed 4
Is there a way to protect myself from typos on lvalue variable names?