Avoid warnings with ruby -w

Hi there,

since there are some instance variables not initialized in constructor ruby -w warns about the usage of undefined variables. To avoid this you have additionally to check for instance_variable_defined?. This is what my patch does.

Greetings,
 CK