If you want the behaviour where undefined instance variable reads raise a NameError, you can use the Ruby gem strict_ivars.
NameError
strict_ivars