This variable access in ruby shouldn’t work, or should it?

Ok this is weird, and seems kind of dangerous.

http://gist.github.com/624138.js

In my opinion there should be an error thrown when I access, a local variable and it is undefined, it should not be passed to the instance and the similar named variable from the instance is passed back. Esspecially when using initializations like the following.

http://gist.github.com/624144.js?file=Variable%20initilization

A long discussion showed this is really something to think about wether it’s a bug or a feature…